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

bots: Fix candlepin image refresh #11387

Closed
wants to merge 2 commits into from

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Mar 13, 2019

Even with Ansible 2.7 the ansible-role-candlepin playbooks don't work.
Reported as https://bugzilla.redhat.com/show_bug.cgi?id=1688153.

Cowboy-apply a fix to the playbooks to avoid a rubygem update. This
doesn't work any more with current gems, as these need ruby >= 2.3.

Fixes #11325

  • image-refresh candlepin

@cockpituous
Copy link
Contributor

image-refresh in progress on bos-tasks-trc09.
Log: https://209.132.184.41:8493/logs/image-refresh-11387-20190313-102424/

@cockpituous cockpituous changed the title bots: Fix candlepin image refresh [no-test] WIP: bos-tasks-trc09: bots: Fix candlepin image refresh [no-test] Mar 13, 2019
@cockpituous cockpituous changed the title WIP: bos-tasks-trc09: bots: Fix candlepin image refresh [no-test] WIP: centosci-tasks-nbf7k: bots: Fix candlepin image refresh [no-test] Mar 13, 2019
@cockpituous
Copy link
Contributor

image-refresh in progress on centosci-tasks-nbf7k.
Log: https://209.132.184.41:8493/logs/image-refresh-11387-20190313-101616/

@martinpitt martinpitt mentioned this pull request Mar 13, 2019
4 tasks
@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: centosci-tasks-nbf7k: bots: Fix candlepin image refresh [no-test] bots: Fix candlepin image refresh [no-test] Mar 13, 2019
martinpitt and others added 2 commits March 13, 2019 11:58
Even with Ansible 2.7 the ansible-role-candlepin playbooks don't work.
Reported as <https://bugzilla.redhat.com/show_bug.cgi?id=1688153>.

Cowboy-apply a fix to the playbooks to avoid a rubygem update. This
doesn't work any more with current gems, as these need ruby >= 2.3.

Fixes cockpit-project#11325
Closes cockpit-project#11387
@martinpitt martinpitt changed the title bots: Fix candlepin image refresh [no-test] bots: Fix candlepin image refresh Mar 13, 2019
@martinpitt
Copy link
Member Author

@KKoukiou : Test flakes are unrelated, this only affects check-packagekit and check-subscriptions. Please let me know if you prefer turning this green, though.

Copy link
Contributor

@KKoukiou KKoukiou left a comment

Choose a reason for hiding this comment

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

Please don't merge this, maybe we can figure out how to use ansible-role-candlepin which looks to do our purpose and get rid of all this hacks

@KKoukiou
Copy link
Contributor

KKoukiou commented Mar 13, 2019

I managed to get the role running , please see commit here, KKoukiou@e81eaf9
But it fails later, which makes me wonder about the following:

I notice the we use to run some tasks as root by specyfying , although the default user is candlepin, which in my case results in the following command failing the playbook:

/usr/bin/bundle install --without proton
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.

Second problem is that even when I ran as candlepin user I get the following error:

TASK [candlepin : Run Bundle install] ******************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/bundle install --without proton", "msg": "", "rc": 10, "stderr": "", "stderr_lines": [], "stdout": "Could not locate Gemfile\n", "stdout_lines": ["Could not locate Gemfile"]}

I am not familiar with ruby, so maybe this rings a bell?

@martinpitt
Copy link
Member Author

@KKoukiou : Many thanks for figuring out how to correctly invoke that playbook! That error just seems like something is running in the wrong directory? The playbook switches back and forth between user and root, so maybe it's checking out the gems into some user dir and then does something as root?

@martinpitt
Copy link
Member Author

And yes, this PR is a gross hack, let's not merge it if there's a better way. Thanks! 🤗

@martinpitt
Copy link
Member Author

PR #11394 is so much better (thanks @KKoukiou !), and sufficiently far along that we really want to go that route. Closing this one.

@martinpitt martinpitt closed this Mar 14, 2019
@martinpitt martinpitt deleted the fix-candlepin branch March 14, 2019 14:44
@martinpitt martinpitt mentioned this pull request Mar 28, 2019
1 task
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.

Image refresh for candlepin
3 participants