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

Update info on python support #38855

Merged
merged 6 commits into from Apr 18, 2018
Merged

Conversation

abadger
Copy link
Contributor

@abadger abadger commented Apr 16, 2018

SUMMARY

This rolls up three five docs changes:

  • Update documentation to say Python 3 is officially supported
  • Adds a few ref targets for some inventory vars
  • Add a platform FAQ section
    • The latter includes documentation on how to solve a problem with non-POSIX shell shipped with Solaris 10.
  • Correct some :ref: tags in the release_and_maintenance doc
  • Fix some Explicit markup ends without a blank line; errors that were introduced by the plugin template.
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
ANSIBLE VERSION
devel 2.5

@abadger
Copy link
Contributor Author

abadger commented Apr 16, 2018

/cc @acozine

@ansibot
Copy link
Contributor

ansibot commented Apr 16, 2018

The test ansible-test sanity --test docs-build [explain] failed with 10 errors:

docs/docsite/rst/index.rst:0:0: unknown: 
docs/docsite/rst/index.rst:0:0: unknown: 
docs/docsite/rst/index.rst:0:0: unknown:     $ cp -r -v /usr/lib64/python3.*/site-packages/selinux/ ./py3-ansible/lib64/python3.*/site-packages/
docs/docsite/rst/index.rst:0:0: unknown:     $ cp -v /usr/lib64/python3.*/site-packages/*selinux*.so ./py3-ansible/lib64/python3.*/site-packages/
docs/docsite/rst/index.rst:0:0: unknown:     $ virtualenv ansible --system-site-packages
docs/docsite/rst/index.rst:0:0: unknown:     $ virtualenv ansible --system-site-packages
docs/docsite/rst/index.rst:0:0: unknown: .. code-block:: shell
docs/docsite/rst/index.rst:0:0: unknown: .. code-block:: shell
docs/docsite/rst/index.rst:0:0: unknown: maximum 1 argument(s) allowed, 16 supplied.
docs/docsite/rst/index.rst:0:0: unknown: maximum 1 argument(s) allowed, 5 supplied.

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

docs/docsite/rst/reference_appendices/faq.rst:162:0: Error in "code-block" directive:

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Apr 16, 2018

@ansibot ansibot added bug This issue/PR relates to a bug. docs This issue/PR relates to or includes documentation. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 16, 2018
@bcoca bcoca changed the title Solaris shell faq Update info on python support Apr 17, 2018
.. note::

If you have Python 3 as a default Python slot on your Gentoo nodes (default setting), then you
must set ``ansible_python_interpreter = /usr/bin/python2`` in your group or inventory variables.
Copy link
Member

Choose a reason for hiding this comment

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

Gentoo defaults to 3.4, so we might want to leave the note but change the content, but probably make it 'some distros' as it is not the only one.

this in inventory like so::

solaris1 ansible_shell_executable=/usr/xpg4/bin/sh

Copy link
Member

Choose a reason for hiding this comment

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

+10 on adding solaris notes

@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Apr 17, 2018
@abadger abadger force-pushed the solaris-shell-faq branch 2 times, most recently from 5720514 to 9d9784f Compare April 17, 2018 14:34
@gundalow gundalow requested a review from acozine April 17, 2018 15:18
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Apr 17, 2018
Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

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

+1 for the Common Platform section. That addresses issue #21594.

Running on Solaris
------------------

Some Solaris machines use a non-POSIX shell by default. This can cause trouble for things such as
Copy link
Contributor

Choose a reason for hiding this comment

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

How about:
"By default, some Solaris machines run a non-POSIX shell, which does not correctly expand the default tmp directory Ansible uses ( ~/.ansible/tmp). If you see module failures on Solaris machines, this is likely the problem. There are several workarounds:"

Copy link
Contributor

Choose a reason for hiding this comment

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

If this is only on certain modules, then I'd say "If you see failures on the x and/or y modules on Solaris machines"

@@ -200,6 +200,8 @@ several workarounds:

solaris1 ansible_shell_executable=/usr/xpg4/bin/sh

(bash, ksh, and zsh should also be POSIX compatible if you have any of those installed).
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for adding specific examples

Ansible 2.2 introduces a tech preview of support for Python 3. For more information, see `Python 3 Support <http://docs.ansible.com/ansible/python_3_support.html>`_.
* By default, Ansible uses the python interpreter located at :file:`/usr/bin/python` to run its
modules. However, some Linux distributions may only have a Python 3 interpreter installed to
:file:`/usr/bin/python3` by default. On those systems, you can either set the
Copy link
Contributor

Choose a reason for hiding this comment

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

What error or behavior would the user see in this scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Latest version adds the error to look out for.

Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

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

WRT issue #21594 this looks good.

Populate it with

* virtualenv info (previously on the python3 support page)
* BSD (Link to the working with BSD page)
* Solaris (Document how to work around the non-POSIX shell on some
  Solaris hosts)

  Fixes ansible#21594
Fix for the module/plugin template unintentionally unindented inside of
a raw block, leading to errors like:

ERROR: docs/docsite/rst/modules/redshift_facts_module.rst:289:0: Explicit markup ends without a blank line; unexpected unindent.
@abadger abadger merged commit a08459a into ansible:devel Apr 18, 2018
@abadger abadger deleted the solaris-shell-faq branch April 18, 2018 20:05
@abadger abadger added this to To Do in 2.5.x blocker list via automation Apr 18, 2018
@abadger
Copy link
Contributor Author

abadger commented Apr 18, 2018

Merged to devel. Adding to the 2.5.x blocker project for potential inclusion in 2.5.2

abadger added a commit that referenced this pull request Apr 19, 2018
* Update the documentation to list Python 3 as official
* Add some reference targets for inventory variables so we can link to docs
* Add a platform FAQ section
  Populate it with

  * virtualenv info (previously on the python3 support page)
  * BSD (Link to the working with BSD page)
  * Solaris (Document how to work around the non-POSIX shell on some
    Solaris hosts)

  Fixes #21594

* Fix some refs in the release_and_maintenance document

* Fix unindent error in module template

Fix for the module/plugin template unintentionally unindented inside of
a raw block, leading to errors like:

ERROR: docs/docsite/rst/modules/redshift_facts_module.rst:289:0: Explicit markup ends without a blank line; unexpected unindent.

* Make wording for Solaris troubleshooting better.

(cherry picked from commit a08459a)
@abadger
Copy link
Contributor Author

abadger commented Apr 19, 2018

cherry-picked to stable-2.5 for inclusion in 2.5.2

@abadger abadger moved this from To Do to Done in 2.5.x blocker list Apr 19, 2018
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
* Update the documentation to list Python 3 as official
* Add some reference targets for inventory variables so we can link to docs
* Add a platform FAQ section
  Populate it with

  * virtualenv info (previously on the python3 support page)
  * BSD (Link to the working with BSD page)
  * Solaris (Document how to work around the non-POSIX shell on some
    Solaris hosts)

  Fixes ansible#21594

* Fix some refs in the release_and_maintenance document

* Fix unindent error in module template

Fix for the module/plugin template unintentionally unindented inside of
a raw block, leading to errors like:

ERROR: docs/docsite/rst/modules/redshift_facts_module.rst:289:0: Explicit markup ends without a blank line; unexpected unindent.

* Make wording for Solaris troubleshooting better.
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. docs This issue/PR relates to or includes documentation. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants