Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1652579

Summary: juniper: cannot update two ports concurrently
Product: Red Hat OpenStack Reporter: Jakub Libosvar <jlibosva>
Component: python-networking-ansibleAssignee: Jakub Libosvar <jlibosva>
Status: CLOSED ERRATA QA Contact: Arkady Shtempler <ashtempl>
Severity: urgent Docs Contact:
Priority: high    
Version: 14.0 (Rocky)CC: aarapov, bfournie, jlibosva, michapma, sclewis
Target Milestone: rcKeywords: AutomationBlocker, Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ansible-1.0.4-5.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:55:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Libosvar 2018-11-22 12:20:28 UTC
Description of problem:
When updating two ports on a switch concurrently, one fails because the other one holds lock. We get traceback.

2018-11-22 00:10:37.222 26 ERROR networking_ansible.ansible_networking [req-7435b1fa-dabb-42e3-82da-131d694dfd05 61467bdcf96a4e2b84bffd08b769f11d 7c5ad5bd6d9d4369a0a8a981b51695e1 - default default] Failed to plug in port 5b52a594-c654-4e60-b3f7-9a5a341d53eb on device: junos from network dd73584d-56e8-4d92-b7cd-1be30cb56e56 reason: ^M
 PLAY [Openstack networking-ansible playbook] ***********************************
 ^M
 TASK [openstack-ml2 : check for required fact: port_name] **********************
 skipping: [junos]
 ^M
 TASK [openstack-ml2 : include and run device provider specific tasks] **********
 included: /usr/share/ansible/roles/openstack-ml2/tasks/run.yaml for junos
 ^M
 TASK [openstack-ml2 : include device role specific tasks] **********************
 included: /usr/share/ansible/roles/openstack-ml2/providers/junos/delete_port.yaml for junos
 ^M
 TASK [openstack-ml2 : junos: run delete_port using netconf] ********************
 included: /usr/share/ansible/roles/openstack-ml2/providers/junos/netconf.yaml for junos
 ^M
 TASK [openstack-ml2 : junos: enable netconf if not already enabled] ************
 ok: [junos]
 ^M
 TASK [openstack-ml2 : junos: set netconf template] *****************************
 ok: [junos]
 ^M
 TASK [openstack-ml2 : junos: send configuration to device] *********************
 An exception occurred during task execution. To see the full traceback, use -vvv. The error was:       exclusive^M
 fatal: [junos]: FAILED! => {"changed": false, "msg": "error editing configuration: \nconfiguration database locked by:\n  root terminal  (pid 3853) on since 2018-11-22 00:10:35 UTC\n      exclusive \n"}
 ^M
 PLAY RECAP *********************************************************************^M
 junos                      : ok=5    changed=0    unreachable=0    failed=1   ^M

: AnsibleRunnerException: ^M

Version-Release number of selected component (if applicable):
python2-networking-ansible-1.0.4-4

How reproducible:


Steps to Reproduce:
1. Create or delete two or more baremetal nodes at once

Actual results:
One port creation/deletion fails

Expected results:
Both actions succeed 

Additional info:
The worse scenario is when deleting a node because then vlan configuration is left on the switch port. Next attempt to change the vlan configuration hits the bug 1641963 which leaves the node completely unusable.

Comment 7 errata-xmlrpc 2019-01-11 11:55:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045