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

community.network.flowadm without maxbw fails on second run #598

Open
dahast opened this issue Apr 26, 2024 · 4 comments
Open

community.network.flowadm without maxbw fails on second run #598

dahast opened this issue Apr 26, 2024 · 4 comments

Comments

@dahast
Copy link

dahast commented Apr 26, 2024

SUMMARY

community.network.flowadm without maxbw fails on second run

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.network.flowadm

ANSIBLE VERSION
ansible [core 2.14.4]
  config file = None
  configured module search path = ['/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/vendor-packages/ansible
  ansible collection location = /usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.16 (main, Mar 22 2023, 18:24:58) [GCC 7.5.0] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
# /usr/lib/python3.9/vendor-packages/ansible_collections
Collection        Version
----------------- -------
community.general 6.5.0

CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

illumos

STEPS TO REPRODUCE

It's legal to create a flow without properties priority or maxbw. In my case it was just to maintain order of udp packages to a certain port.

For the task both properties are optional, priority is set to 'medium' in this case, maxbw is unset.

On first run the task creates the flow without the properties, that's ok.

But on second run the task first determines if flow needs update, which is set to true, because the flowadm show-flowprop returns '?' for maxbw, which is not equal to the required maxbw (''). Then the task tries to run an flowadm set-prop, but add not props. The resulting cmd fails.

The task should handle the '?' properly and moreover the update should do a flowadm reset-prop if maxbw changes from a value to none in the task.

Run this twice:

- name: Add flow control to i40e0 for udp port 5409
  community.network.flowadm:
    link: "i40e0"
    flow: "flow-0"
    transport: udp
    local_port: 5409
    state: present
EXPECTED RESULTS

ok on second run

ACTUAL RESULTS

fail on second run

2024-04-25 17:24:19,670 p=5518 u=name n=ansible | failed: [host] (item={'link': 'i40e0', 'flow': 'flow-0'}) => {"ansible_loop_var": "item", "changed": false, "item": {"flow": "flow-0", "link": "i40e0"}, "msg": "Error while updating flow: \"/sbin/flowadm: flow property must be specified\n\"", "name": "flow-0", "rc": 1, "stderr": "/sbin/flowadm: flow property must be specified\n", "stderr_lines": ["/sbin/flowadm: flow property must be specified"]}```
@Andersson007
Copy link
Contributor

@dahast hello, thanks for reporting the issue
Pinging folks specified as maintainers in BOTMETA.yml @xen0l @danowar2k @fishman @jasperla @jpdasma @mator @scathatheworm @troy2914

@danowar2k
Copy link

I'm sorry, but why am I listed as a maintainer here? I have never to my knowledge contributed to this repository...

@Andersson007
Copy link
Contributor

Andersson007 commented Apr 29, 2024

@danowar2k i don't know, this stuff was moved here from ansible/ansible. Anyway, removed you from the file #599. If you recall you should be there, please let me know, i'll revert the PR, thanks

@danowar2k
Copy link

Thanks for removing me! (A long while back I was a little bit active in some Solaris Ansible modules, maybe this was residue from then)

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

3 participants