Skip to content

Commit 0a7d5b2

Browse files
authored
Merge pull request #1913 from stackhpc/claudia-baremetaluser
Updating policy for neutron and nova to include role: baremetaluser
2 parents 4deb6f0 + f1387b3 commit 0a7d5b2

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Policy for a baremetaluser role
2+
===============================
3+
4+
When deploying Slurm on baremetal nodes, it is typical to select a specific
5+
baremetal node, and give it the expected hostname. We allow this via a tweak to
6+
Nova policy.
7+
8+
Similarly, it is common that the IP address has to match the expected one for
9+
the given node. We tweak neutron policy to allow fixed IPs, even when we do
10+
not own the network.
11+
12+
We should never use the admin role to do these operations, as it has far too
13+
much privilege.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Comments show default policy for neutron.
2+
#"create_port:fixed_ips:ip_address": "(rule:admin_only) or (rule:service_api) or role:manager and project_id:%(project_id)s or role:member and rule:network_owner"
3+
"create_port:fixed_ips:ip_address": "(rule:admin_only) or (rule:service_api) or role:manager and project_id:%(project_id)s or role:member and rule:network_owner or role:baremetaluser"
4+
#"create_port:mac_address": "(rule:admin_only) or (rule:service_api) or role:manager and project_id:%(project_id)s or role:member and rule:network_owner"
5+
"create_port:mac_address": "(rule:admin_only) or (rule:service_api) or role:manager and project_id:%(project_id)s or role:member and rule:network_owner or role:baremetaluser"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Comments show default policy for nova.
2+
#"os_compute_api:servers:create:forced_host": "rule:context_is_admin"
3+
"os_compute_api:servers:create:forced_host": "rule:context_is_admin or role:baremetaluser"
4+
#"compute:servers:create:requested_destination": "rule:context_is_admin"
5+
"compute:servers:create:requested_destination": "rule:context_is_admin or role:baremetaluser"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
Adds a mixin environment that includes policy overrides to enable a
5+
``baremetaluser`` role, that is able to create servers on specific
6+
baremetal nodes, with specific IP addresses on a shared network.

0 commit comments

Comments
 (0)