Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_try_reapply failing to modify connection #337

Open
zzzoom opened this issue Dec 29, 2020 · 0 comments
Open

_try_reapply failing to modify connection #337

zzzoom opened this issue Dec 29, 2020 · 0 comments

Comments

@zzzoom
Copy link

zzzoom commented Dec 29, 2020

I ran into the following error on 1.2.0 while running the role to modify an existing infiniband connection:

[003] <info>  #0, state:up persistent_state:present, 'Infiniband0': update connection Infiniband0, 9db4c28a-4058-47c2-b963-d3b7fffb8a1f
[004] <info>  #0, state:up persistent_state:present, 'Infiniband0': up connection Infiniband0, 9db4c28a-4058-47c2-b963-d3b7fffb8a1f (is-modified)
[005] <warn>  #0, state:up persistent_state:present, 'Infiniband0': failure: Argument 1 does not allow None as a value (up) [[Traceback (most recent call last):
  File \"master:/home/bc/playbooks/roles/linux-system-roles.network/library/network_connections.py\", line 1850, in run
  File \"master:/home/bc/playbooks/roles/linux-system-roles.network/library/network_connections.py\", line 2222, in run_action_up
  File \"master:/home/bc/playbooks/roles/linux-system-roles.network/library/network_connections.py\", line 2259, in _try_reapply
  File \"master:/home/bc/playbooks/roles/linux-system-roles.network/library/network_connections.py\", line 1449, in reapply
  File \"/home/bc/playbooks/roles/linux-system-roles.network/module_utils/network_lsr/utils.py\", line 157, in call_async_method
TypeError: Argument 1 does not allow None as a value

The problem seems to be in

self.nmutil.reapply(devices[0])
where reapply is called without passing a connection, which then calls call_async_method with None as connection. I haven't tried the main branch but _try_reapply remains the same so it's likely to persist.

I got it working with this patch, but I'm not sure it's the best way:

-                    self.nmutil.reapply(devices[0])
+                    self.nmutil.reapply(devices[0], active_connection.get_connection())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant