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

Refs #30423 - preserve old pulpcore MEDIA_ROOT on upgrades #543

Closed

Conversation

wbclark
Copy link
Contributor

@wbclark wbclark commented Jul 17, 2020

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I don't think this is right. IMHO we should get everyone on the same layout and move files around if needed. The problem is that this means every upgrading user will forever be on a different layout than fresh installs which is hard to support.

Let's first agree on the correct layout (theforeman/puppet-pulpcore#113 (review)) and then think about how to deal with upgrades.

@@ -14,6 +14,7 @@ certs:
foreman_proxy_content:
proxy_pulp_isos_to_pulpcore: false
proxy_pulp_yum_to_pulpcore: false
pulpcore_media_root: /var/lib/pulp
Copy link
Member

Choose a reason for hiding this comment

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

This matches the default, so no need to include this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's included to make it easy to tell new installs apart from upgrades.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wbclark
Copy link
Contributor Author

wbclark commented Jul 17, 2020

I don't think this is right. IMHO we should get everyone on the same layout and move files around if needed.

Is there anything stopping us from doing this within a migration @ekohl ?

@ekohl
Copy link
Member

ekohl commented Jul 17, 2020

Yes, it's not the appropriate place. Migrations are only for the configs and run in a RPM %post hook. Moving the files there is guaranteed to break things.

@wbclark
Copy link
Contributor Author

wbclark commented Jul 17, 2020

Yes, it's not the appropriate place. Migrations are only for the configs and run in a RPM %post hook. Moving the files there is guaranteed to break things.

How then do you propose moving the uploaded content to the new MEDIA_ROOT directory on upgrades? I think you must have something in mind other than asking users to do it manually?

@ekohl
Copy link
Member

ekohl commented Jul 17, 2020

How then do you propose moving the uploaded content to the new MEDIA_ROOT directory on upgrades? I think you must have something in mind other than asking users to do it manually?

A hook in pre makes the most sense to me. However, the steps we need to take (and we're extremely late in doing this):

  • Agree on a directory layout
  • Get the proper SELinux policy
  • Work out a migration

This should really have been done before we even started to ship it in nightly. Now I just wrote something in puppet-pulpcore but forgot a TODO so others didn't see it.

@ekohl
Copy link
Member

ekohl commented Oct 9, 2020

Closing in favor of the alternative approach.

@ekohl ekohl closed this Oct 9, 2020
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.

3 participants