Open moschlar opened 5 years ago
In the early revisions of the orchestrator I uninstalled the pre-existing version of Ansible but reverted this because I felt it too destructive.
Was it a system 2.7.5 that was installed that you removed?
Was it a system 2.7.5 that was installed that you removed?
No, its 0:2.8.2-1.el7
...
The fix for this might be to introduce sudo
to the orchestrator. Replacing the installed ansible (by not using --user) seems to fix the problem. Maybe we need to amend the pip adjustment section in create.py
(around line 128) with something like...
cmd = 'sudo pip install --upgrade pip'
rv, _ = io.run(cmd, '.', cli_args.quiet)
if not rv:
return False
cmd = 'sudo pip install --upgrade pip setuptools'
rv, _ = io.run(cmd, '.', cli_args.quiet)
if not rv:
return False
cmd = 'sudo pip install ansible=={}'. \
format(deployment.okd.ansible_version)
rv, _ = io.run(cmd, '.', cli_args.quiet)
if not rv:
return False
Hm, but you also install a version of Ansible in the image building process (from yacker/files/okd-requirements.txt
).
And isn't it generally a bad idea to mix such packages from the distribution and another package management mechanism? :grimacing:
Yep, mixing is bad, agreed and if there's a basic fault we should fix it.
More often though it turns out to be a battle with Python modules that have been installed in distributions with package managers other than PIP.
I have found the underlying yacker-built machine images to be generally suitable for the existing array of deployments. I have tended to re-build the infrastructure (machine instances) between installations rather than "try again" on potentially "dirty" machines though.
Thanks for persevering with this. It is all helpful.
No problem, this kind of experimentation is where most new stuff is learned :grin:
I've re-opened this because using sudo
breaks the in-docker execution of the orchestrator.
I'm beginning to feel that it's potentially very complicated for the orchestrator to be able to cope with any host configuration/setup and that it's the host that needs adjusting, not the orchestrator. Adding a command-line option to enable sudo (so it runs without sudo in the container and with sudo outside) just feels messy.
The sudo changes (in master) have been undone and we should see what needs to be done on a "clean" example of the problem machine.
If I remove the Ansible rpm from the system, it works again for the next run.