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

Perform post upgrade checks/verification using a Pulp Smash script #517

Open
omaciel opened this issue Jan 27, 2017 · 5 comments
Open

Perform post upgrade checks/verification using a Pulp Smash script #517

omaciel opened this issue Jan 27, 2017 · 5 comments

Comments

@omaciel
Copy link
Contributor

omaciel commented Jan 27, 2017

Our existing upgrade process relies on a shell script that calls pulp-admin to loop through some expected content populated by a prior task. However, there is no reliable way to use pulp-admin to assert that the content populated prior to the upgrade is actually still available and migrated to the newer version.

It would be great to write a Python script which can import Pulp Smash to perform these post upgrade checks and therefore increase our trust in the upgrade jobs.

@kdelee
Copy link
Contributor

kdelee commented Aug 1, 2017

@omaciel @Ichimonji10

As I mentioned in issue #520 I am working on this, here are the tests of the populated content

If you can take look I'm sure I could benefit from some code review.

@Ichimonji10
Copy link
Contributor

Ichimonji10 commented Aug 4, 2017

I have a few suggestions:

  1. De-indent this call to delete orphans. When orphans are deleted, they are removed globally from the entire Pulp application. De-indenting that line of code lets there be just one call to delete orphans, instead of one call for each for loop iteration.
  2. Run the linters over that code. I noticed a few nit-picky things that could be fixed, like unused imports. The linters will tell you about those issues, and they might find some more serious issues to boot.
  3. Add a docstring in the __init__.py module explaining how to use these scripts. Alternately, link from that module to some other place that explains how to use the scripts.

Nice work.

@kdelee
Copy link
Contributor

kdelee commented Aug 4, 2017

Great, thanks for the feedback. I'll ping you when I have made some more progress!

@kdelee
Copy link
Contributor

kdelee commented Aug 17, 2017

@kdelee kdelee assigned nixocio and unassigned kdelee Aug 17, 2017
@Ichimonji10
Copy link
Contributor

Ichimonji10 commented Aug 22, 2017

This is done. Pulp Migrate contains a Python code that populates Pulp, plus Python code that verifies that Pulp has been correctly populated, both pre- and post-upgrade. Also, pulp_packaging contains an Ansible playbook that uses these scripts, and a JJB definition that calls the Ansible playbook.

We need to fully switch over to using the new code.

@Ichimonji10 Ichimonji10 reopened this Aug 22, 2017
@nixocio nixocio removed their assignment May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants