Skip to content

Uyuni proxy upgrade keichwa #388

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

Merged
merged 9 commits into from
Jul 24, 2020
Merged

Uyuni proxy upgrade keichwa #388

merged 9 commits into from
Jul 24, 2020

Conversation

keichwa
Copy link
Contributor

@keichwa keichwa commented Jul 21, 2020

Description

upgrade uyuni proxy to 2020.07 with OS update

Target branches

To what product version this document applies?

  • Manager-3.2
  • Manager-4.0
  • Manager-4.1
  • Uyuni

Links

Fixes #<insert issue or PR link, if any>

Copy link
Member

@juliogonzalez juliogonzalez left a comment

Choose a reason for hiding this comment

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

Are you sure this is the correct procedure? I never tried to upgrade a proxy, but it doesn't make any sense to me. Specially because you are installing server repositories.

AFAIK the proxies are always clients, so that would mean either updating the clients from the Uyuni Server, either just replacing them.

Please check with @mantel

. Replace and refresh software repositories:
+
----
mv /etc/zypp/repos.d /etc/zypp/repos.d.old
Copy link
Member

Choose a reason for hiding this comment

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

Huh? what's this :-?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's creating a backup of the old repos directory but this is wrong. What if the user has some other repositories enabled?

Copy link
Member

Choose a reason for hiding this comment

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

On a proxy, it should not. This is not what worries me most. The whole script is what worries me. I think it's the wrong way to do the uprade.

Copy link
Member

@juliogonzalez juliogonzalez Jul 21, 2020

Choose a reason for hiding this comment

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

Funny enough it seems we tell people to install the Uyuni Proxy not as a client: https://www.uyuni-project.org/uyuni-docs/uyuni/installation/install-proxy-uyuni.html

I don't know why this is this way. To me it seems strange and wrong, but OK. For now it is how it is. So the script seems to make sense.

Copy link
Member

@juliogonzalez juliogonzalez Jul 21, 2020

Choose a reason for hiding this comment

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

Ah now I understand it. You tell them to it that way, but then you say this: https://www.uyuni-project.org/uyuni-docs/uyuni/installation/uyuni-proxy-registration.html (BTW the channel name for spacewalk-common-channels is not uyuni-proxy-stable-leap-151 bot uyuni-proxy-stable-leap)

So in the end this migration script is still wrong, as the proxies will be clients. If you run this script, yeah, the migration will work, but then the Server will still think the proxy is a Leap 15.1, so I guess it will crate a mess.

This what I suspect that needs to be done if you want to migrate:

  1. Add the Leap 15.2 channels with spacewalk-common-channels opensuse_leap15_2 opensuse_leap15_2-non-oss opensuse_leap15_2-non-oss-updates opensuse_leap15_2-updates opensuse_leap15_2-uyuni-client uyuni-proxy-stable-leap-152
  2. Sync them: spacewalk-repo-sync -p opensuse_leap15_2-x86_64 (this will sync the parent and all children).
  3. Adjust the proxies using SSM or one by one to use the Leap 15.2 channels you just added and synced. Remember to apply the changes.
  4. Perform the migration (this is the "gray" area for me, maybe this where they need to run spacewalk-proxy stop; zypper ref; zypper -n dup --allow-vendor-change; shutdown -r now directly on the proxies).

And that should be all.

As for the procedure to add the proxy, itself, I'd say its wrong. What should be required is: Clean openSUSE Leap 15.2 installed and 100% updated (now that we are switching), and then Proxy Registration and finally Uyuni Proxy Setup (BTW the requirements still say Leap 15.1)

BTW I just noticed we don't have uyuni-proxy-stable-leap-152, so time to create it.

Copy link
Member

@juliogonzalez juliogonzalez Jul 21, 2020

Choose a reason for hiding this comment

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

OK, I thought a little about all this mess. Let's do the following:

  1. I will tag Uyuni tomorrow, and will no accept more submissions to the master branch (meanwhile I will prepare a MU as well)
  2. @keichwa and @mantel can test the migration of the proxy tomorrow and Thursday and have the doc ready by end of Thursday
  3. @jcayouette prepares the package and the PR for the website on Thursday by the end of the day, or Friday, early in the morning.
  4. I start the release on Friday morning, as soon as the PR and the package for the doc are ready.
  5. We create an issue for the Uyuni Proxy Installation, so we can remove that instruction about adding the repositories manually, but to be fixed on a future Uyuni release.

Sounds fair enough? That gives some more time to test the migration without that much pressure.

Please ACK tomorrow morning if we have an agreement.

Copy link

Choose a reason for hiding this comment

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

I answered too quickly yesterday. While this script probably would (sort of) work, the clean way to upgrade the proxy would be to initiate an autoyast upgrade from the server. This way all the information regarding the proxy would stay consistent. We even had this documented some time ago; biggest issue is providing a working autoyast file which is a bit tricky.

Copy link

Choose a reason for hiding this comment

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

So in the end this migration script is still wrong, as the proxies will be clients. If you run this script, yeah, the migration will work, but then the Server will still think the proxy is a Leap 15.1, so I guess it will crate a mess.

Maybe this could even be fixed up by refreshing the information from the proxy, but yes, the only really clean way is to perform the upgrade via autoyast so the server is aware of any modifications done to the proxy.

Copy link
Member

Choose a reason for hiding this comment

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

I think that providing manual instructions should be fine as well (if it is easier) as long as they are accurate. Something like what I described above.

Copy link

Choose a reason for hiding this comment

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

I think that providing manual instructions should be fine as well (if it is easier) as long as they are accurate. Something like what I described above.

Yes, especially as it is much easier than to fiddle around with autoyast files. We just need to confirm that the changes in the proxy's system can be updated to the new state afterwards.

@juliogonzalez juliogonzalez self-requested a review July 21, 2020 18:08
Copy link
Member

@juliogonzalez juliogonzalez left a comment

Choose a reason for hiding this comment

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

I approved, but I obviously was requesting changes :-)

. Replace and refresh software repositories:
+
----
mv /etc/zypp/repos.d /etc/zypp/repos.d.old
Copy link
Contributor

Choose a reason for hiding this comment

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

It's creating a backup of the old repos directory but this is wrong. What if the user has some other repositories enabled?

Thanks, Pau!

Co-authored-by: Pau Garcia Quiles <[email protected]>
@keichwa
Copy link
Contributor Author

keichwa commented Jul 22, 2020 via email

@keichwa keichwa requested review from juliogonzalez and paususe July 22, 2020 12:54
@keichwa keichwa marked this pull request as ready for review July 22, 2020 12:55
@keichwa
Copy link
Contributor Author

keichwa commented Jul 22, 2020

can you please check whether I'm on the right track. I mostly reused what we have for upgrading/migrating SUMA Proxy, and I tried to adjust it as needed.

Copy link
Member

@juliogonzalez juliogonzalez left a comment

Choose a reason for hiding this comment

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

Not approving, but not declining either.

If both procedures are tested to work, then I am happy with merging the PR.

If not, please test at least the non-autoyast approach, and if you can't test autoyast just don't document it for now.

. In the {productname} Server {webui}, navigate to menu:Systems[Proxy] and click the name of the proxy.
. Click menu:Software[Software Channels], and select the openSUSE Leap {opensuse-version} channel.
. Click menu:Software[Packages], and select all the packages to be updated on the proxy, and then apply the selection.
. On the {productname} Proxy, start the proxy service:
Copy link
Member

Choose a reason for hiding this comment

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

Does it work? If so, fine with me.

. On the {productname} Server {webui}, navigate to the [guimenu]``System List``, select the proxy, and navigate to the menu:Software[Software Channels] subtab.
. Clear the old channels.
. In the [guimenu]``Base Channel`` field, select `openSUSE Leap 15.1 (x86_64)``.
. In the [guimenu]``Child Channels`` field, select all the recommended channels.
Copy link
Member

Choose a reason for hiding this comment

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

Does this procedure work? Otherwise I'd not document it.

@juliogonzalez
Copy link
Member

can you please check whether I'm on the right track. I mostly reused what we have for upgrading/migrating SUMA Proxy, and I tried to adjust it as needed.

Please test at least the manual procedure, ask help from @mantel if needed, and feel free to remove autoyast for now if you can't verify it.

Copy link
Member

@juliogonzalez juliogonzalez left a comment

Choose a reason for hiding this comment

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

To me it looks good. Was autoyast procedure tested as well? If so: great! If not, I'd avoid publishing it for now.

@keichwa
Copy link
Contributor Author

keichwa commented Jul 24, 2020

To me it looks good. Was autoyast procedure tested as well? If so: great! If not, I'd avoid publishing it for now.

the ay procedure is currently not included in the generated docs. I commented the include statement in the nav.

@keichwa keichwa merged commit 7f66b2a into master Jul 24, 2020
@keichwa keichwa deleted the uyuni-proxy-upgrade-keichwa branch July 24, 2020 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants