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

Pass new ansible-runner parameters to reduce number of artifacts we don't need on file system #11472

Merged
merged 3 commits into from Jan 20, 2022

Conversation

AlanCoding
Copy link
Member

SUMMARY

Connect #11356

Direct follow-up from ansible/ansible-runner#937 and ansible/ansible-runner#939

This has not been tested. At all. Once I verify functionality I will make it non-draft.

ISSUE TYPE
  • Feature Pull Request
  • Bugfix Pull Request
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

Now I'm testing in conjunction with ansible/ansible-runner#943

@AlanCoding
Copy link
Member Author

That's working as intended. I'll mark this as non-draft whenever the ansible-runner PR merges.

@AlanCoding
Copy link
Member Author

I rebuilt the image and ran the demo job template with cleanup turned off, it produces this:

$ docker exec -it tools_receptor_1 tree /tmp/awx_694_yhrvjvsf
/tmp/awx_694_yhrvjvsf
├── artifacts
│   └── 694
│       ├── ansible_version.txt
│       ├── collections.json
│       ├── command
│       ├── env.list
│       ├── job_events
│       ├── rc
│       └── status
├── cp
├── env
│   ├── cmdline
│   ├── envvars
│   ├── extravars
│   ├── passwords
│   ├── settings
│   └── ssh_key
├── inventory
│   └── hosts
└── project
    ├── hello_world.yml
    └── README.md

7 directories, 15 files

$ docker exec -it tools_awx_1 tree /tmp/awx_694_yhrvjvsf
/tmp/awx_694_yhrvjvsf
├── artifacts
│   └── 694
│       ├── ansible_version.txt
│       ├── collections.json
│       ├── command
│       ├── env.list
│       ├── job_events
│       ├── rc
│       └── status
├── cp
├── env
│   ├── cmdline
│   ├── envvars
│   ├── extravars
│   ├── passwords
│   ├── settings
│   └── ssh_key
├── inventory
│   └── hosts
└── project
    ├── hello_world.yml
    └── README.md

7 directories, 15 files

This is a pretty good reflection of the intent. The structures match, not as much unnecessary stuff being written.

@AlanCoding
Copy link
Member Author

There's still a problem here, because we get things from the artifact directory after a run has completed. With this work, that has obviously moved. This affects inventory, facts, and other stuff.

@AlanCoding
Copy link
Member Author

that should be wrapped up with the last commit, kicking off more tests now.

This requires corresponding ansible-runner changes
  which are only available in devel branch
  to do this, requirements are changed
  to install ansible-runner devel as it did before

Revert "Use ansible-runner 2.1.1 build"

This reverts commit f0ede01.

Add back in change from updater.sh that we want to keep
@AlanCoding
Copy link
Member Author

I discovered an unexpected test failure related to this. This is where my latest commit is coming from - it deletes the artifacts folder after it has been sent so that we can detect cases where the fact cache was cleared.

Looking further at this, I went down the rabbit hole which was #11560, and I have a pretty good idea of some followup bug fixes and improvements.

I also believe that AWX devel branch is very broken with the ansible-runner devel branch to the extent that facts are not even saved (because process takes ident, and everything gets confused).

I believe this PR should work as good as current devel branch with the latest commit, and I have restarted tests to confirm.

@AlanCoding AlanCoding merged commit add54bf into ansible:devel Jan 20, 2022
@AlanCoding AlanCoding deleted the process_ident branch February 7, 2022 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants