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

Add all necessary packages to bootstrap repo (Centos) #2193

Closed
vampywiz17 opened this issue May 8, 2020 · 13 comments
Closed

Add all necessary packages to bootstrap repo (Centos) #2193

vampywiz17 opened this issue May 8, 2020 · 13 comments

Comments

@vampywiz17
Copy link

vampywiz17 commented May 8, 2020

Hello there,

If we want to install/configure salt via bootstrap, we need to add this dependencies:

Installing:
 salt                                                x86_64                 2019.2.0-40.1.uyuni                   susemanager:bootstrap                 162 k
 salt-minion                                         x86_64                 2019.2.0-40.1.uyuni                   susemanager:bootstrap                 160 k
Installing for dependencies:
 PyYAML                                              x86_64                 3.10-11.el7                           base                                  153 k
 libsodium                                           x86_64                 1.0.18-1.el7                          epel                                  147 k
 libyaml                                             x86_64                 0.1.4-11.el7_0                        base                                   55 k
 openpgm                                             x86_64                 5.2.122-2.el7                         epel                                  171 k
 python-babel                                        noarch                 0.9.6-8.el7                           base                                  1.4 M
 python-backports                                    x86_64                 1.0-8.el7                             base                                  5.8 k
 python-backports-ssl_match_hostname                 noarch                 3.5.0.1-1.el7                         base                                   13 k
 python-chardet                                      noarch                 2.2.1-3.el7                           base                                  227 k
 python-ipaddress                                    noarch                 1.0.16-2.el7                          base                                   34 k
 python-jinja2                                       noarch                 2.7.2-4.el7                           base                                  519 k
 python-markupsafe                                   x86_64                 0.11-10.el7                           base                                   25 k
 python-msgpack-python                               x86_64                 0.4.6-2.7.uyuni                       susemanager:bootstrap                  75 k
 python-pycrypto                                     x86_64                 2.6.1-2.7.uyuni                       susemanager:bootstrap                 453 k
 python-requests                                     noarch                 2.6.0-9.el7_8                         susemanager:bootstrap                  94 k
 python-six                                          noarch                 1.9.0-2.el7                           base                                   29 k
 python-tornado                                      x86_64                 4.2.1-5.el7                           base                                  641 k
 python-urllib3                                      noarch                 1.10.2-7.el7                          base                                  103 k
 python2-futures                                     noarch                 3.1.1-5.el7                           base                                   29 k
 python2-psutil                                      x86_64                 5.6.7-1.el7                           epel                                  399 k
 python2-salt                                        x86_64                 2019.2.0-40.1.uyuni                   susemanager:bootstrap                 9.7 M
 python2-zmq                                         x86_64                 14.7.0-11.el7                         epel                                  505 k
 zeromq                                              x86_64                 4.1.4-6.el7                           epel                                  556 k

Most of them is get to base repo and epel(!!) It not so good, becaouse most of time the (on my infra) bootstraped server can not connect to the internet. It possible to add all neccesarry dependencies to bootstrap repo?

@juliogonzalez
Copy link
Member

What CentOS version?

What version of Uyuni are you using?

I see the packages defined as part of the bootstrap repos for 6 and 7:

https://github.com/uyuni-project/uyuni/blob/master/susemanager/src/mgr_bootstrap_data.py#L252
https://github.com/uyuni-project/uyuni/blob/master/susemanager/src/mgr_bootstrap_data.py#L302

Could be your bootstrap repository is outdated and you need to regenerate it. If the packages on the repositories available to the client are newer, those will be used (local repositories are disabled after the bootstrap, not before).

@vampywiz17
Copy link
Author

vampywiz17 commented May 8, 2020

I use Centos 7 and Uyuni 2020.04

Now i regen. the bootstrap repo and try it again!

Thanks the help!

@vampywiz17
Copy link
Author

vampywiz17 commented May 8, 2020

@juliogonzalez

Now i do this:

#!/bin/bash
awk '/- Base/ && !x {print "enabled=0"; x=1} 1' /etc/yum.repos.d/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo.bak ; yes | cp -rf /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo ; rm -rf /etc/yum.repos.d//CentOS-Base.repo.bak
awk '/- Updates/ && !x {print "enabled=0"; x=1} 1' /etc/yum.repos.d/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo.bak ; yes | cp -rf /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo ; rm -rf /etc/yum.repos.d//CentOS-Base.repo.bak
awk '/- Extras/ && !x {print "enabled=0"; x=1} 1' /etc/yum.repos.d/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo.bak ; yes | cp -rf /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo ; rm -rf /etc/yum.repos.d//CentOS-Base.repo.bak
wget --no-check-certificate -O - https://uyuni.hft.rosenberger.local/pub/bootstrap/bootstrap-centos7.sh | /bin/bash

It better now, start to install, but when i install it, i get this:

image

So one package missing, right?

@juliogonzalez
Copy link
Member

@vampywiz17 see #2115

@vampywiz17
Copy link
Author

vampywiz17 commented May 8, 2020

@juliogonzalez

Yes, but i can not add the epel, i disable all repos.

if i add epel via post script and enable internet access to the VM, it working well. (all other repos, exclode bootrstrap and epel diabled)

So my only problem that one packege need to salt, that only download it with epel repo. I think a workround, that i download the package to a local webserver. but it not so clean..

@juliogonzalez
Copy link
Member

I think I am missing something here. You should not needed any local repositories enabled on an instance when you are bootstrapping.

Just disable all local repos on the instance before bootstrapping it, and all needed packages will come from the bootstrap repo, as described at #2115 (comment)

Of course if you then run the update, you will get the issue described at that very same comment.

The issue should go away when we start shipping salt 3000 (requires Leap 15.2 to be published).

However it can happen at any time, so we opened yesterday an internal (SUSE Manager) research card, that should result on an RFC to be discussed with the community for a result to be implemented.

Of course if in the meantime anyone comes with a good idea, we'll be happy to hear about it :-)

@vampywiz17
Copy link
Author

vampywiz17 commented May 8, 2020

@juliogonzalez

I dont understand... I disable all repos via script #2193 (comment) and after i run bootstrap and i get the error...

edit:

Now i try this:

#!/bin/bash
awk '/- Base/ && !x {print "enabled=0"; x=1} 1' /etc/yum.repos.d/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo.bak ; yes | cp -rf /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo ; rm -rf /etc/yum.repos.d//CentOS-Base.repo.bak
awk '/- Updates/ && !x {print "enabled=0"; x=1} 1' /etc/yum.repos.d/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo.bak ; yes | cp -rf /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo ; rm -rf /etc/yum.repos.d//CentOS-Base.repo.bak
awk '/- Extras/ && !x {print "enabled=0"; x=1} 1' /etc/yum.repos.d/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo.bak ; yes | cp -rf /etc/yum.repos.d/CentOS-Base.repo.bak /etc/yum.repos.d/CentOS-Base.repo ; rm -rf /etc/yum.repos.d//CentOS-Base.repo.bak
yum clean all
yum update
wget --no-check-certificate -O - https://uyuni.hft.rosenberger.local/pub/bootstrap/bootstrap-centos7.sh | /bin/bash

edit2:

same... not working. All other repo is disabled,

@juliogonzalez
Copy link
Member

Is EPEL7 a child of the parent channel for CentOS7 at the Uyuni Server?

If that's the case, and the bootstap repository was created with packages from EPEL, I think you will have this problem as well.

Solution: remove EPEL7 or move it out of the CentOS7 tree, regenerate the bootstrap repository (-f), then onboard.

On paper you can readd EPEL7 again to the tree after the bootstrap repo regenerated, but as of this moment EPEL is know to provoke problems, as described at #2115

I try to open the link: https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/CentOS7-Uyuni-Client-Tools/CentOS_7/repodata/repomd.xml.key
but seems to not working...

That's not the bootstrap repository, but the client tools repository. It's a GPG key and I can open it (but not with Chrome or Chromium as I think it will think it's a XML).

@vampywiz17
Copy link
Author

vampywiz17 commented May 8, 2020

@juliogonzalez

If that's the case, and the bootstap repository was created with packages from EPEL, I think you will have this problem as well.

Yes i think it is the probem!

Solution: remove EPEL7 or move it out of the CentOS7 tree

You help me a little that how to move it ? (i dont want to delete it with spacewalk-remove-channel )

@juliogonzalez
Copy link
Member

You help me a little that how to move it ? (i dont want to delete it with spacewalk-remove-channel)

I was thinking that changing the parent channel was possible, but just checked on my Uyuni server and that value can't be changed.

So the alternative that should work:

  1. Create a new (temporary) parent channel
    • For the values copy the values from the EPEL channel, except for the parent (leave none) and make sure you add temp- as a prefix for channel label, name and summary.
  2. Attach the EPEL repository to this new parent channel
  3. Dettach the EPEL repository from the EPEL channel
  4. Remove the EPEL channel
  5. Relaunch the bootstrap repo generation (make sure you use -f to recreate it from scratch).
  6. Create the EPEL channel again (manually)
  7. Dettach the EPEL repo from the temporary parent channel to the EPEL channel.
  8. Remove the temporary parent channel.

However this could impact your activation keys, so make sure they are OK after step 8 and before bootstrapping any new client.

Also the bad news is that you will need to do this workaround each time you want to update your bootstrap repositories (from time to time we request a refresh if we change packages).

So there isn't an elegant way of fixing right now.

Still this won't fix the problem you see at #2115 (comment)

So as you can see, all in all, what I propose is an ugly hack.

The short message is "EPEL is not supported right now, we are working to see how we can fix this problem (and the problem with any other repositories that could cause the same issue)".

@vampywiz17
Copy link
Author

@juliogonzalez

I see, it a sad news...

Now i delete the epel repo , regenerate the bootstrap repo and download the epel again. Now the kickstart is working well. (for a while seems to)

I hope you are fix it in the future.

Thanks to the help!!

@juliogonzalez
Copy link
Member

Glad I could help.

Since we have this problem already at #2115, do you mind if I close this issue?

@vampywiz17
Copy link
Author

Yes, please close it! Thanks!

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

No branches or pull requests

2 participants