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

Improve sytem facts for AIX #63233

Closed
wants to merge 6 commits into from

Conversation

flynn1973
Copy link

@flynn1973 flynn1973 commented Oct 8, 2019

SUMMARY

some ideas for aix system specific facts.
mainly from https://github.com/molekuul/AIX_ansible-modules

former pr
#49062

Fixes #61944

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

facts

ADDITIONAL INFORMATION

ansible would benefit from some more aix specific facts. collected some ideas here.

@ansibot ansibot added affects_2.10 core_review feature needs_triage new_contributor support:core labels Oct 8, 2019
@flynn1973
Copy link
Author

flynn1973 commented Oct 8, 2019

label+ aix

@ansibot
Copy link
Contributor

ansibot commented Oct 8, 2019

The test ansible-test sanity --test pylint [explain] failed with 4 errors:

lib/ansible/module_utils/facts/system/aix.py:123:35: bad-whitespace: No space allowed after bracket         niminfo_facts['niminfo'] = [ niminfo ]                                    ^
lib/ansible/module_utils/facts/system/aix.py:123:45: bad-whitespace: No space allowed before bracket         niminfo_facts['niminfo'] = [ niminfo ]                                              ^
lib/ansible/module_utils/facts/system/aix.py:258:31: bad-whitespace: No space allowed after bracket         uname_facts['uname'] = [ uname ]                                ^
lib/ansible/module_utils/facts/system/aix.py:258:39: bad-whitespace: No space allowed before bracket         uname_facts['uname'] = [ uname ]                                        ^

The test ansible-test sanity --test ansible-doc [explain] failed with the error:

Command "ansible-doc -t strategy debug free host_pinned linear" returned exit status 250.
>>> Standard Error
ERROR! Unexpected Exception, this is probably a bug: No module named 'commands'

The test ansible-test sanity --test package-data [explain] failed with the error:

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/package-data.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 383, in <module>
    main()
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 360, in main
    sdist_path = create_sdist(tmp_dir)
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 174, in create_sdist
    raise Exception('make snapshot failed:\n%s' % stderr)
Exception: make snapshot failed:
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
docs/man/man1/ansible-galaxy.1.rst:51: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
docs/man/man1/ansible-galaxy.1.rst:57: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
ERROR! Unexpected Exception, this is probably a bug: No module named 'commands'
Traceback (most recent call last):
  File "packaging/release/changelogs/changelog.py", line 835, in <module>
    main()
  File "packaging/release/changelogs/changelog.py", line 102, in main
    args.func(args)
  File "packaging/release/changelogs/changelog.py", line 132, in command_release
    plugins = load_plugins(version=version, force_reload=reload_plugins)
  File "packaging/release/changelogs/changelog.py", line 184, in load_plugins
    '--json', '--metadata-dump', '-t', plugin_type])
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/tmp/tmp7_7p6w63/bin/ansible-doc', '--json', '--metadata-dump', '-t', 'strategy']' returned non-zero exit status 250.
make: *** [changelog] Error 1

The test ansible-test sanity --test import --python 3.5 [explain] failed with 5 errors:

lib/ansible/module_utils/facts/system/aix.py:17:0: ImportError: No module named 'commands'
lib/ansible/modules/cloud/cloudstack/cs_facts.py:107:0: ImportError: No module named 'commands'
lib/ansible/modules/packaging/language/pip_package_info.py:98:0: ImportError: No module named 'commands'
lib/ansible/modules/packaging/os/package_facts.py:212:0: ImportError: No module named 'commands'
lib/ansible/modules/system/setup.py:137:0: ImportError: No module named 'commands'

The test ansible-test sanity --test import --python 3.6 [explain] failed with 5 errors:

lib/ansible/module_utils/facts/system/aix.py:17:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/cloud/cloudstack/cs_facts.py:107:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/packaging/language/pip_package_info.py:98:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/packaging/os/package_facts.py:212:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/system/setup.py:137:0: ModuleNotFoundError: No module named 'commands'

The test ansible-test sanity --test import --python 3.7 [explain] failed with 5 errors:

lib/ansible/module_utils/facts/system/aix.py:17:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/cloud/cloudstack/cs_facts.py:107:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/packaging/language/pip_package_info.py:98:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/packaging/os/package_facts.py:212:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/system/setup.py:137:0: ModuleNotFoundError: No module named 'commands'

The test ansible-test sanity --test import --python 3.8 [explain] failed with 5 errors:

lib/ansible/module_utils/facts/system/aix.py:17:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/cloud/cloudstack/cs_facts.py:107:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/packaging/language/pip_package_info.py:98:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/packaging/os/package_facts.py:212:0: ModuleNotFoundError: No module named 'commands'
lib/ansible/modules/system/setup.py:137:0: ModuleNotFoundError: No module named 'commands'

The test ansible-test sanity --test pep8 [explain] failed with 18 errors:

lib/ansible/module_utils/facts/system/aix.py:76:30: E128: continuation line under-indented for visual indent
lib/ansible/module_utils/facts/system/aix.py:123:37: E201: whitespace after '['
lib/ansible/module_utils/facts/system/aix.py:123:45: E202: whitespace before ']'
lib/ansible/module_utils/facts/system/aix.py:189:26: E128: continuation line under-indented for visual indent
lib/ansible/module_utils/facts/system/aix.py:224:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:225:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:226:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:227:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:228:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:229:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:230:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:231:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:232:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:233:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:234:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:235:5: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:258:33: E201: whitespace after '['
lib/ansible/module_utils/facts/system/aix.py:258:39: E202: whitespace before ']'

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

lib/ansible/module_utils/facts/system/aix.py:0:0: should not have a shebang

click here for bot help

@ansibot ansibot added needs_revision and removed core_review labels Oct 8, 2019
@ansibot
Copy link
Contributor

ansibot commented Oct 8, 2019

The test ansible-test sanity --test pep8 [explain] failed with 14 errors:

lib/ansible/module_utils/facts/system/aix.py:73:30: E128: continuation line under-indented for visual indent
lib/ansible/module_utils/facts/system/aix.py:186:26: E128: continuation line under-indented for visual indent
lib/ansible/module_utils/facts/system/aix.py:221:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:222:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:223:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:224:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:225:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:226:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:227:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:228:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:229:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:230:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:231:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:232:5: E122: continuation line missing indentation or outdented

click here for bot help

@goneri goneri added the ci_verified label Oct 9, 2019
@ansibot
Copy link
Contributor

ansibot commented Oct 9, 2019

The test ansible-test sanity --test pep8 [explain] failed with 14 errors:

lib/ansible/module_utils/facts/system/aix.py:73:30: E128: continuation line under-indented for visual indent
lib/ansible/module_utils/facts/system/aix.py:186:26: E128: continuation line under-indented for visual indent
lib/ansible/module_utils/facts/system/aix.py:221:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:222:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:223:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:224:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:225:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:226:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:227:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:228:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:229:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:230:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:231:9: E122: continuation line missing indentation or outdented
lib/ansible/module_utils/facts/system/aix.py:232:5: E122: continuation line missing indentation or outdented

click here for bot help

@samdoran samdoran changed the title aix system facts ideas Improve sysytem facts for AIX Oct 14, 2019
@samdoran samdoran changed the title Improve sysytem facts for AIX Improve sytem facts for AIX Oct 14, 2019
@sivel sivel removed the needs_triage label Oct 15, 2019
@ansibot ansibot removed the ci_verified label Oct 16, 2019
@ansibot
Copy link
Contributor

ansibot commented Oct 16, 2019

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/module_utils/facts/system/aix.py:221:20: E126: continuation line over-indented for hanging indent
lib/ansible/module_utils/facts/system/aix.py:232:19: E126: continuation line over-indented for hanging indent

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 16, 2019

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/module_utils/facts/system/aix.py:221:15: E126: continuation line over-indented for hanging indent
lib/ansible/module_utils/facts/system/aix.py:232:15: E123: closing bracket does not match indentation of opening bracket's line

click here for bot help

@ansibot ansibot added the stale_ci label Oct 26, 2019
@flynn1973
Copy link
Author

flynn1973 commented Oct 31, 2019

can somebody add the aix label?

@samdoran samdoran added the aix label Nov 4, 2019
@ansibot ansibot removed the needs_revision label Nov 4, 2019
@ansibot ansibot added the core_review label Nov 4, 2019
@mator
Copy link
Contributor

mator commented Jan 7, 2020

would be nice to have AIX distribution check added to module test unit test/units/module_utils/test_distribution_version.py

@flynn1973
Copy link
Author

flynn1973 commented Mar 12, 2020

folks, please review to get it merged before collections makes things even more complicated.

@ansibot ansibot added needs_revision pre_azp and removed core_review stale_ci labels Dec 5, 2020
@kairoaraujo
Copy link
Contributor

kairoaraujo commented May 12, 2021

I got an AIX to test it.
My question is, it should move to community collections?

Copy link
Author

@flynn1973 flynn1973 left a comment

more or less ok

@ansibot ansibot added the needs_rebase label Mar 10, 2022
@jborean93
Copy link
Contributor

jborean93 commented Aug 10, 2022

Hi!

Thanks very much for your submission to Ansible. It means a lot to us that you've taken time to contribute.

Unfortunately, we're not sure if we want this feature in the program, and I don't want this to seem confrontational.
Our reasons for this are:

  • We currently do not test on AIX so introducing new changes in core for AIX hosts is tricky, we cannot verify whether things break now or in the future
  • Our recommendation at this point in time is to create your own _facts module in your collection and have that be configured to run with gather_facts automatically
    • The config option for this is FACTS_MODULE
    • This allows you to run both setup and any other module you wish when the gather_facts action is run (both explicitly and with the play)
  • We do have a proposal to try and make facts extensible through ansible/proposals#205, this might be of interest in the future

However, we're absolutely always up for discussion.
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:

In the future, sometimes starting a discussion on the development list prior to implementing a feature can make getting things included a little easier, but it's not always necessary.

Thank you once again for this and your interest in Ansible!

@jborean93 jborean93 closed this Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 aix feature needs_rebase needs_revision new_contributor pre_azp support:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants