<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hey Albert,<div><br></div><div>The policy is the default Neutron policy in OpenStack Train. These can indeed be changed and customised, but my assumption is that you haven’t created any custom policies. Horizon uses the default for each service unless it’s been overwritten.</div><div><br></div><div>If I create a non-admin user and try to change security groups I also get the same error:</div><div>2022-09-14 22:01:33,370 64 INFO openstack_dashboard.dashboards.project.networks.ports.workflows Failed to update port 4df563ce-5464-4f7d-8aaf-c5496cdaefda: ((rule:update_port and rule:update_port:binding:vnic_type) and rule:update_port:port_security_enabled) is disallowed by policy</div><div><br></div><div>And I can reproduce your same scenario ff I try via the CLI using these steps:</div><div>1. Add entry for new user to clouds.yaml file:</div><div><div><font face="Menlo"> bne-home-test:</font></div><div><font face="Menlo"> auth:</font></div><div><font face="Menlo"> auth_url: https://openstack.bne-home.net:13000</font></div><div><font face="Menlo"> password: "test"</font></div><div><font face="Menlo"> project_domain_name: Default</font></div><div><font face="Menlo"> project_name: bne-home</font></div><div><font face="Menlo"> user_domain_name: Default</font></div><div><font face="Menlo"> username: test</font></div><div><font face="Menlo"> cacert: ~/.certs/overcloud-cacert.pem</font></div><div><font face="Menlo"> identity_api_version: '3'</font></div><div><font face="Menlo"> region_name: regionOne</font></div><div><font face="Menlo"> volume_api_version: ‘3'</font></div></div><div><br></div><div>2. <font face="Menlo">export OS_CLOUD=bne-home-test</font></div><div><font face="Menlo"><br></font></div><div>3. Try to remove security group from port:</div><div><div><font face="Menlo">❯ openstack server show test-lb-net -c security_groups -c addresses -f yaml</font></div><div><font face="Menlo">addresses:</font></div><div><font face="Menlo"> lb-mgmt-net:</font></div><div><font face="Menlo"> - 172.24.0.90</font></div><div><font face="Menlo"> vlan4-infra:</font></div><div><font face="Menlo"> - 172.20.13.175</font></div><div><font face="Menlo">security_groups:</font></div><div><font face="Menlo">- name: management-bne</font></div></div><div><br></div><div><div><font face="Menlo">❯ openstack port show 4df563ce-5464-4f7d-8aaf-c5496cdaefda -c fixed_ips -c port_security_enabled -c security_group_ids -f yaml</font></div><div><font face="Menlo">fixed_ips:</font></div><div><font face="Menlo">- ip_address: 172.20.13.175</font></div><div><font face="Menlo"> subnet_id: 71aad09a-3e7b-4399-97bf-075f066f6713</font></div><div><font face="Menlo">port_security_enabled: true</font></div><div><font face="Menlo">security_group_ids:</font></div><div><font face="Menlo">- a3ae6e20-67df-4a72-9d5b-cc21ad87464f</font></div></div><div><br></div><div><font face="Menlo">❯ openstack port unset --security-group a3ae6e20-67df-4a72-9d5b-cc21ad87464f 4df563ce-5464-4f7d-8aaf-c5496cdaefda</font></div><div><div><font face="Menlo">❯ openstack port show 4df563ce-5464-4f7d-8aaf-c5496cdaefda -c fixed_ips -c port_security_enabled -c security_group_ids -f yaml</font></div><div><font face="Menlo">fixed_ips:</font></div><div><font face="Menlo">- ip_address: 172.20.13.175</font></div><div><font face="Menlo"> subnet_id: 71aad09a-3e7b-4399-97bf-075f066f6713</font></div><div><font face="Menlo">port_security_enabled: true</font></div><div><font face="Menlo">security_group_ids: []</font></div></div><div><br></div><div><br></div><div>Verify that I’m definitely not a admin user:</div><div><div><font face="Menlo">❯ openstack server list --all</font></div><div><font face="Menlo">Policy doesn't allow os_compute_api:servers:detail:get_all_tenants to be performed. (HTTP 403) (Request-ID: req-75c19210-ad91-471f-b500-e1f3482825f8)</font></div></div><div><br></div><div><br></div><div>I don’t think this user should be allowed to do that via the CLI either. So that could be a bug there. The request in the Neutron server.log when I do it via the CLI:</div><div>2022-09-14 22:19:12.987 21 INFO neutron.wsgi [None req-f99c4c15-003c-4f7e-9e41-9100daa2a566 781362d053ee4708a21430d3a825795a 3ff28fc7abf742a6b7a0d016771dee49 - - default default] 192.168.1.17,172.16.2.85 "PUT /v2.0/ports/4df563ce-5464-4f7d-8aaf-c5496cdaefda HTTP/1.1" status: 200 len: 1102 time: 0.4449480</div><div><br></div><div>VS Horizon:</div><div>2022-09-14 22:20:23.087 20 INFO neutron.wsgi [None req-4c284690-eb69-43df-b205-4953a88ab87c 781362d053ee4708a21430d3a825795a 3ff28fc7abf742a6b7a0d016771dee49 - - default default] 172.20.10.25,172.16.2.85 "PUT /v2.0/ports/4df563ce-5464-4f7d-8aaf-c5496cdaefda HTTP/1.1" status: 403 len: 386 time: 0.2209103</div><div><br></div><div>I have raised a upstream bug for this since I can still reproduce it on the latest version of OpenStack:</div><div><div style="display: block;"><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://bugs.launchpad.net/neutron/+bug/1989627"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:228px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://bugs.launchpad.net/neutron/+bug/1989627" dir="ltr" role="button" draggable="false" width="228"><table style="table-layout:fixed;border-collapse:collapse;width:228px;background-color:#E5E6E9;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="228"><tbody><tr><td vertical-align="center" align="center"><img style="width:228px;filter:brightness(0.97);height:228px;" width="228" height="228" draggable="false" class="lp-rich-link-mediaImage" alt="launchpad-og-image.png" src="cid:C944DE4F-B4D4-471E-821B-83F2EE847D60"></td></tr><tr><td vertical-align="center"><table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="228" style="font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(229, 230, 233, 1);" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://bugs.launchpad.net/neutron/+bug/1989627" style="text-decoration: none" draggable="false"><font color="#272727" style="color: rgba(0, 0, 0, 0.847059);">Bug #1989627 “Policy enforcement variance between openstackcli a...” : Bugs : neutron</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://bugs.launchpad.net/neutron/+bug/1989627" style="text-decoration: none" draggable="false"><font color="#808080" style="color: rgba(0, 0, 0, 0.498039);">bugs.launchpad.net</font></a></div></div></td></tr></tbody></table></td></tr></tbody></table></a></div></div><br></div><div><br></div><div><div>Brendan Shephard<br>Senior Software Engineer<br>Brisbane, Australia<br><br><br>
</div>
<div><br><blockquote type="cite"><div>On 15 Sep 2022, at 2:25 am, Albert Braden <ozzzo@yahoo.com> wrote:</div><br class="Apple-interchange-newline"><div><div> Hi Brendan, thanks for offering to help! I'll contact you privately with info about some languishing cases.<br><br>Here's the policy line:<br>"update_port:port_security_enabled": "rule:context_is_advsvc or rule:admin_or_network_owner"<br><br>Does this policy only affect Horizon? I'm using the same non-admin user for both CLI and Horizon, on a project where that user is a member. The network was created by the admin user.<br> </div> <div class="yahoo_quoted" style="margin:10px 0px 0px 0.8ex;border-left:1px solid #ccc;padding-left:1ex;"> <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"> <div> On Wednesday, September 14, 2022, 10:41:31 AM EDT, Brendan Shephard <bshephar@redhat.com> wrote: </div> <div><br></div> <div><br></div> <div><div id="yiv3809434980"><div>Hi Albert,<div><br clear="none"></div><div>While I may not be the best person to address your Horizon concern. I can probably help you with your Red Hat support concerns. If you had any issues you wanted addressed, or feedback you wanted to provide. Feel free to give me a yell.</div><div><br clear="none"></div><div>Looking at your Horizon issue though. It seems the default policy file is what prevents you from updating that port. We can see the default policy like this for example:</div><div><br clear="none"></div><div><div><font face="Menlo">[root@controller-2 ~]# podman exec -it neutron_api oslopolicy-policy-generator --namespace neutron | grep "update_port:port_security_enabled"</font></div><div><font face="Menlo">"update_port:port_security_enabled": "rule:context_is_advsvc or rule:admin_or_network_owner"</font></div></div><div><br clear="none"></div><div>When you execute the command via the CLI, which user are you using? Are you just sourcing the <font face="Menlo">overcloudrc</font> file, or using <font face="Menlo">export</font> <font face="Menlo">OS_CLOUD=overcloud. </font>If that’s the case then you would be using the admin user on the CLI, but probably a different user when logging into Horizon.</div><div><br clear="none"></div><div>I too would suggest opening a support case. It sounds like you have previously had a negative experience with that. If you want to open a new one and share the case number with me, I can follow up on that for you. As someone who personally knows a lot of the RHOSP Technical Support team from around the world. I’m confident we can right whatever wrong may have occurred there.</div><div><br clear="none"></div><div>Let me know if I can help in any way.</div><div><br clear="none"></div><div>Regards,</div><div><br clear="none"></div><div><div>Brendan Shephard<br clear="none">Senior Software Engineer<br clear="none">Brisbane, Australia<br clear="none"><br clear="none"><br clear="none"></div><div id="yiv3809434980yqt68957" class="yiv3809434980yqt5610702678"><div><br clear="none"><blockquote type="cite"><div>On 14 Sep 2022, at 10:36 pm, Albert Braden <ozzzo@yahoo.com> wrote:</div><br clear="none" class="yiv3809434980Apple-interchange-newline"><div><div> On CLI I can type "openstack port set --no-security-group <ID>" to remove all security groups. In Horizon, the equivalent operation would be using the - button to remove all groups and then clicking "Update." Using the + button would be the equivalent of typing "openstack port set --security-group <group ID>". There doesn't seem to be a way to remove a single security group via CLI; I think the only way would be to set --no-security-group and then add back the desired groups.<br clear="none"><br clear="none">I can successfully add security groups to a port via CLI, or I can remove all security groups. If I go into Horizon and try these operations then I get the error when I click "Update." So it appears that security groups can be added and removed, with port security set, via CLI. We only see the failure when we try to do it via Horizon.<br clear="none"><br clear="none">Regarding RHOSP support; I assume that you are joking, or maybe haven't experienced the support that they offer.<br clear="none"> </div> <div style="margin:10px 0px 0px 0.8ex;border-left:1px solid #ccc;padding-left:1ex;" class="yiv3809434980yahoo_quoted"> <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"> <div> On Tuesday, September 13, 2022, 06:30:11 PM EDT, Laurent Dumont <laurentfdumont@gmail.com> wrote: </div> <div><br clear="none"></div> <div><br clear="none"></div> <div><div id="yiv3809434980"><div><div dir="ltr">If you are running RHOSP, you might have a support contract with Red Hat?<div><br clear="none"></div><div>Are you trying to remove all the security groups from a port that has port_security enabled?</div></div><br clear="none"><div id="yiv3809434980yqt44993" class="yiv3809434980yqt7970716572"><div class="yiv3809434980gmail_quote"><div dir="ltr" class="yiv3809434980gmail_attr">On Tue, Sep 13, 2022 at 11:53 AM Albert Braden <<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:ozzzo@yahoo.com" target="_blank" href="mailto:ozzzo@yahoo.com">ozzzo@yahoo.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;" class="yiv3809434980gmail_quote"><div> Unfortunately we are running RHOSP in which Train is the latest and greatest. This is what we see in horizon.log:<br clear="none"><br clear="none">[Tue Sep 13 15:28:15.362703 2022] [wsgi:error] [pid 27:tid 139683266553600] [remote <a rel="nofollow noopener noreferrer" shape="rect" target="_blank" href="http://10.232.233.11:57498/">10.232.233.11:57498</a>] Failed to update port 08fdbb97-4896-4afb-9390-41481ff27cac: ((rule:update_port and rule:update_port:binding:vnic_type) and rule:update_port:port_security_enabled) is disallowed by policy<br clear="none"> </div> <div style="margin:10px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;"> <div style="font-family:Helvetica, Arial, sans-serif;font-size:13px;color:rgb(38,40,42);"> <div> On Friday, September 9, 2022, 10:59:34 AM EDT, Pierre Riteau <<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:pierre@stackhpc.com" target="_blank" href="mailto:pierre@stackhpc.com">pierre@stackhpc.com</a>> wrote: </div> <div><br clear="none"></div> <div><br clear="none"></div> <div><div id="yiv3809434980m_-4487918859824189139yiv8965467104"><div><div dir="ltr"><div>Hello,</div><div><br clear="none"></div><div>This is more likely to be a Horizon bug than an issue with Kolla itself, since Kolla doesn't change much from the default configuration.</div><div><br clear="none"></div><div>You should check Horizon logs in /var/log/kolla/horizon to find the error. I would also encourage you to upgrade to a more recent release, since Train has been marked as End of Life in Kolla recently.</div><div><br clear="none"></div><div>Cheers,</div><div>Pierre Riteau (priteau)</div><br clear="none"><div id="yiv3809434980m_-4487918859824189139yiv8965467104yqt41160"><div><div dir="ltr">On Fri, 9 Sept 2022 at 15:41, Albert Braden <<a rel="nofollow noopener noreferrer" shape="rect" ymailto="mailto:ozzzo@yahoo.com" target="_blank" href="mailto:ozzzo@yahoo.com">ozzzo@yahoo.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">We're running kolla train and we're seeing an apparent bug when we try to add or remove security groups on a port. We see error "Failed to update port <ID>". It works fine in CLI; we only see this in Horizon. Is this a known bug, or are we doing something wrong?<br clear="none"><br clear="none"></blockquote></div></div></div></div></div></div> </div> </div></blockquote></div></div></div></div></div> </div> </div></div></blockquote></div></div><br clear="none"></div></div></div></div> </div> </div></div></blockquote></div><br></div></body></html>