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

Add support of facts gathering WWNs on AIX OS #51704

Merged
merged 9 commits into from
Apr 10, 2019
Merged

Conversation

mator
Copy link
Contributor

@mator mator commented Feb 4, 2019

SUMMARY

Add support of facts gathering WWNs on AIX OS

Extends #37043 / c65909d "Add network fact to obtain FC WWN initiator ports" for AIX support

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

facts module

ADDITIONAL INFORMATION
aix$ lsdev -Cc adapter -l fcs*
fcs0 Defined   00-00 8Gb PCI Express Dual Port FC Adapter
fcs1 Defined   00-01 8Gb PCI Express Dual Port FC Adapter
fcs2 Available 04-00 8Gb PCI Express Dual Port FC Adapter
fcs3 Available 04-01 8Gb PCI Express Dual Port FC Adapter

aix$ lscfg -vl fcs3 | grep "Network Address"
        Network Address.............10000090FA551509

before:

$ ansible -v vios8 -m setup -a "filter=ansible_fibre*"
Using /home/mator/ans/ansible.cfg as config file
vios8 | SUCCESS => {
    "ansible_facts": {
        "ansible_fibre_channel_wwn": []
    }, 
    "changed": false
}

after:

$ ansible vios8 -m setup -a "filter=ansible_fibre*"
vios8 | SUCCESS => {
    "ansible_facts": {
        "ansible_fibre_channel_wwn": [
            "10000090FA551508", 
            "10000090FA551509"
        ]
    }, 
    "changed": false
}

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 4, 2019
@mator
Copy link
Contributor Author

mator commented Feb 4, 2019

if you remove failed OSX (runs almost for 1h , ssh returned 255 code), shippable ended ok (green)

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 4, 2019
@mator mator closed this Feb 4, 2019
@mator mator reopened this Feb 4, 2019
@mator
Copy link
Contributor Author

mator commented Feb 4, 2019

+label aix

@gundalow gundalow added the aix AIX community label Feb 5, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 10, 2019
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Feb 12, 2019
@dagwieers
Copy link
Contributor

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 20, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 2, 2019
@gforster
Copy link
Contributor

Works as expected on AIX 7.1 and 7.2

@mator
Copy link
Contributor Author

mator commented Mar 29, 2019

could probably rework a bit to remove grep filtering and use python instead , as well would not need to use unsafe_shell without grep.

if lscfg_out.find('Network Address') 
...

@dagwieers
Copy link
Contributor

@mator Indeed, can you fix that grep, should be quite easy loop over lines.

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 29, 2019
@ansibot
Copy link
Contributor

ansibot commented Mar 29, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/database/postgresql/postgresql_membership.py:0:0: E322 Argument 'ca_cert' is listed in the argument_spec, but not documented in the module documentation

click here for bot help

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Mar 29, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 29, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 6, 2019
…r ports"

adding support of enumerating AIX device WWN ports

$ lsdev -Cc adapter -l fcs*
fcs0 Defined   00-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1 Defined   00-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs2 Available 04-00 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs3 Available 04-01 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

$ lscfg -vpl fcs3 | grep 'Network Address'
        Network Address.............10000090FA551509
- fix run_command execution, passing 'use_unsafe_shell=True' since we have a pipe in it ( | grep )
  if we don't set unsafe shell, it will return error on execution.

- strip new line characters at the end of WWNs.
@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Apr 9, 2019
@mator
Copy link
Contributor Author

mator commented Apr 9, 2019

ready_for_review

Copy link
Contributor

@resmo resmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gforster
Copy link
Contributor

7.1 & 7.2 check out

LGTM

Sent with GitHawk

@resmo
Copy link
Contributor

resmo commented Apr 10, 2019

bot_status

@ansibot
Copy link
Contributor

ansibot commented Apr 10, 2019

Components

changelogs/fragments/fibre_channel_wwn_fact_aix.yaml
support: community
maintainers:

lib/ansible/module_utils/facts/network/fc_wwn.py
support: core
maintainers:

Metadata

waiting_on: ansible
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 1
shipit_actors (maintainers or core team members): resmo
shipit_actors_other: gforster
automerge: automerge shipit test failed

click here for bot help

@resmo resmo merged commit 19f6634 into ansible:devel Apr 10, 2019
@mator mator deleted the aix_wwn branch April 11, 2019 11:04
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aix AIX community core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants