we have 3 primary SAP HANA servers running SUSE as EC2 instances on Amazon AWS. I am new to my company and have inherited these servers.
we have a server for dev, test, and production, all are running SLES 11 SP2
I need to install packages, upgrade them, etc. I noticed we were still using susecloud service in zypper
– Dev Environment –
I did the upgrade procedure but received errors so I did the following:
cd /etc/zypp
mkdir old
mv credentials.d repos.d services.d old
mkdir credentials.d repos.d services.d
instanceInfraUpgrade
(forums.aws.amazon.com had that idea)
I received more errors about missing python-mcrypt package so I downloaded and installed that (wget http://download.opensuse.org/repositories/openSUSE:/Tools/SLE_11_SP2/x86_64/python-M2Crypto-0.21.1-1.1.x86_64.rpm)
installed and ran the instanceUpgradeInfra script again and it worked perfectly. new repos are enabled and work on DEV
zypper returned the correct repos and I could install software again – great.
– Test Environment –
downloaded the instanceInfraUpgrade package
when I ran the script it deleted all of the old susecloud repos, but didn’t install any new ones.
zypper lr
| Alias | Name | Enabled | Refresh
–±------------------------±------------------------±--------±-------
1 | nVidia-Driver-SLE11-SP2 | nVidia-Driver-SLE11-SP2 | Yes | Yes
2 | server_monitoring | server_monitoring | Yes | No
I can see in the script this code checks for “susecloud” and if it is not found, it assumes (wrongly) that smt repos are installed, so it removes itself and quits
if [ -f /usr/sbin/registercloudguest ]; then
hasSUSEcloud=$(zypper ls | grep -v SMT | grep 'susecloud')
if [ -n "$hasSUSEcloud" ];then
removeDeprecatedService
rm -rf /etc/zypp/repos/*susecloud*
else
echo "--> Instance is already set up for the new infrastructure, nothing todo"
fi
destruct
exit 0
fi
comment that out.
now, the setup function will fail because it has already removed susecloud so it can’t remove it again, so we will comment that out along with the check of what that returns:
#suse_register --no-refresh -E || return
...
#if ! setup; then
# echo "--> Setup cloud configuration failed"
# exit 1
#fi
ok now it goes directly to the attempt to start the guestregister service, which fails and creates /var/log/cloudregister
errors are “server error 403 unauthorized” for every IP. It’s a 242 line file with errors, I assume I shouldn’t post that hahaha.
I also noticed the /etc/zypp/credentials.d/ directory is empy now – should that be restored from the archive I made of /etc/zypp/* to resolve the errors?
how do I resolve this and get the smt repositories? I need to do this for this environment and production still. Please let me know if anyone has any ideas.