Ansible privilege escalation fails when we run a command manually.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
In Progress
|
Undecided
|
Douglas Gameiro Diniz |
Bug Description
Brief Description
-----------------
When we try to run an Ansible command that needs to become root, it fails when trying do to the privilege escalation.
Severity
--------
Minor
Steps to Reproduce
------------------
Try to run the following command on any controller:
ansible localhost -K -b -m shell -a "whoami" -c local
Expected Behavior
------------------
It should print "root".
Actual Behavior
----------------
The command hangs forever.
Reproducibility
---------------
It happens 100% of the time on all the systems I tested.
System Configuration
-------
Simplex and Standard 2+2, but probably happens in any configuration.
Branch/Pull Time/Commit
-------
Last Pass
---------
This error is occurring for some time and there is no information about the last pass.
Timestamp/Logs
--------------
Attach the logs for debugging (use attachments in Launchpad or for large collect files use: https:/
Provide a snippet of logs here and the timestamp when issue was seen.
Please indicate the unique identifier in the logs to highlight the problem
Test Activity
-------------
Developer Testing and Upgrade Testing
Workaround
----------
Run a command as root before running the ansible command. For example a "sudo ls". This way it will run as sudo while the sudo session remains active for some minutes.
description: | updated |
Changed in starlingx: | |
assignee: | nobody → Douglas Gameiro Diniz (dgdiniz) |
Fix proposed to branch: master /review. opendev. org/c/starlingx /ansible- playbooks/ +/897433
Review: https:/