Koozali.org: home of the SME Server

Removing installed contribs before update to SME8

Offline jim7jim

  • **
  • 61
  • +0/-0
Removing installed contribs before update to SME8
« on: June 28, 2013, 06:38:37 PM »
Hello, I'm preparing to upgrade from SMEv7.6 to SMEv8. The documentation here 'http://wiki.contribs.org/SME_Server_8' says to remove all contribs prior to upgrade. I'm assuming I can remove contribs from the server manager Software installer but the list of Installed packages is fairly large. Is there any way to identify the contrib packages to uninstall vs. base SME packages that I don't want to remove? TIA

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #1 on: June 29, 2013, 07:38:47 AM »
jim7jim

Quote
I'm preparing to upgrade from SMEv7.6 to SMEv8. The documentation here 'http://wiki.contribs.org/SME_Server_8' says to remove all contribs prior to upgrade.

That is not strictly required AFAIK. I think it may have referred to the earlier sme8beta releases.

You can ascertain which sme 7.x contribs are compatible with sme 8, and only uninstall the ones that are not compatible.
Some contribs have been updated to suit sme8 (ie el5 packages), but many others that were OK for sme7.x (el4 packages) still work OK on sme8.
Reinstall the el5/sme8 version contribs after upgrading the server OS to sme8.
Check this page for compatibility notes made during sme8 beta development
http://wiki.contribs.org/SME8.0_Contribs_QA
and also check the wiki contrib articles, as recently there has been some significant amount of work done to upgrade contribs & improve the wiki articles with sme8 specific instructions & package versions.


Quote
Is there any way to identify the contrib packages to uninstall vs. base SME packages that I don't want to remove?

/sbin/e-smith/audittools/newrpms

Personally I would not go wildly uninstalling contribs & other packages.
Just uninstall any obviously incompatible contribs, but I think many of the issues with contribs have been sorted out now and/or sme8 el5 versions have been released.

So remove incompatible contribs, & reinstall or upgrade with sme8 versions after the OS upgrade.

Probably the more important critical thing to do is to remove any custom templates, or otherwise check them for compatibility with sme8, and replace (copy them back or modify to suit) them after the OS upgrade.
You can temporarily move the custom templates to a safe location on the server (not /tmp as they may be deleted), and copy them back one by one afterwards to check if OK, one at a time, expanding & restarting events to suit.

I assume in all the above comments that you are using a sme8 CD to upgrade the same hardware that already has an existing 7.6 system installed on it, rather than backing up & restoring to a clean sme8 on new hardware.

If you have a spare machine & two drives in RAID1, then you can disconnect the machine from the Internet (to stop new email flowing in etc), remove one drive, connect the drive to the test machine (or the offline server used as a test machine) & try upgrading that. You will soon discover any issues. You may be lucky & have no problems.
Keep one drive untouched, so you can easily revert to the old system if necessary.

Also make sure you do a full backup say to removable USB drive, before upgrading
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline jim7jim

  • **
  • 61
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #2 on: June 29, 2013, 06:09:27 PM »
Janet, thanks for the information and suggestions. The contribs I know are installed are listed as compatible so I will upgrade without removing them. Thanks again, it is really appreciated!

Offline jim7jim

  • **
  • 61
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #3 on: July 06, 2013, 07:30:01 PM »
So I tried to upgrade from SME v7.6 to SME v8 using the CD but the upgrade did not go well. I thought the contribs I had loaded were compatible but maybe not. As far as I know, only the smeserver-vacation and smeserver-userpanel contribs are loaded. After the upgrade, I was getting some error messages on boot:

Something about Invalid KERNEL operation, Invalid rules a few times and then the following error over and over again:
httpd: Syntax error on line 88 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_imap.so into server: /etc/httpd/modules/mod_imap.so: cannot open shared object file: No such file or directory

The server stuck displaying this over and over and never got to the login prompt. I could not login via server-manager or putty and couldn't ping the server.

I reverted back to v7.6 with my mirrored disk that I removed prior to the upgrade. So in searching I found a suggestion to see what package requires mod_imap.so.

If I run: 'yum provides mod_imap.so'  I get:

yum provides mod_imap.so
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "protect-packages" plugin
Loading "fastestmirror" plugin
Searching Packages:
Setting up repositories
Cannot find a valid baseurl for repo: smeaddons
Error: Cannot find a valid baseurl for repo: smeaddons

If I look in http.conf, I can see a line: LoadModule imap_module modules/mod_imap.so

I can see the mod_imap.so file in my v7.6 server, but I'm not sure if it was removed during the v8 upgrade? I'm really not sure where to go from here. At first I thought I had an imcompatible contrib, but I don't know how to identify it or remove it prior to upgrade.

Does anyone know what steps I need to take to resolve this? TIA

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #4 on: July 07, 2013, 02:56:29 AM »
jim7jim


Quote
The server stuck displaying this over and over and never got to the login prompt.

You need to open another occurrence of the command prompt console/shell, I think Alt F2, & Alt F1 to switch back IIRC, then you can log in without seeing all those errors, & then start troubleshooting.

Before the upgrade, did you actually look to see if you have any custom templates setup, if so I would remove those, then do
signal-event post-upgrade
signal-event reboot

then try upgrading via CD & see what happens when the server restarts.

Look in /etc/e-smith/templates-custom/
& more specifically for httpd.conf in
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/...
Move any existing templates to a safe location before upgrading.
After the upgrade review them to see if still needed.
Ideally copy existing sme8 templates and modify them with the changes required, rather than using the older sme7.x based (custom) templates.

Alternatively boot up in Rescue Mode.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline pc_doc

  • 4
  • +0/-0
  • the Original PC Doctor
Re: Removing installed contribs before update to SME8
« Reply #5 on: July 07, 2013, 05:40:14 PM »
Hi Jim. I am having a similar issue.

I maintain a number of servers for non-profits and charities among my paying customers. All paying customers have upgraded to 8 so no issues.

However the charities need a fair bit of budging when it comes to spending money, even on new hard drives so I am finally getting around to upgrading some from 7.6 to 8.

I am getting the same "Cannot find a vaild baseurl for repo" issue as you are reporting.

I have upgraded the BaseURL's for smecontribs, smeos, and smeupdates to http://smeserver.mirror.garr.it/mirrors/smeserver/releases/obsolete/7.6/... but still getting the same fault.

The only way to avoid this is to do a yum --disablerepo=(all the sme repos) update which doesn't really help matters.

As I can't remove some of the contribs which may break 8, and I can't install DAR2 because of this, I am looking at just manually doing a backup from the admin console, installing fresh SME 8, then hoping a restore from backup works.

If anyone has any info on why yum has broken for 7.6, please chime in.
Failure is not an option -
                                  It comes bundled with Microsoft products!

Offline idp_qbn

  • ****
  • 346
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #6 on: July 08, 2013, 12:29:53 AM »
PC-Docs
Read this: http://forums.contribs.org/index.php/topic,49749.0.html

Tells you exactly why, I think.

Cheers
Ian
___________________
Sydney, NSW, Australia

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #7 on: July 08, 2013, 01:11:24 AM »
jim7jim & pc_doc

Quote
Cannot find a valid baseurl for repo: smeaddons

That is because it (smeaddons for 7.6) no longer exists.
As advised other functionally important repos have been moved to the obsolete tree (ie smecontribs, smeos, smeupdates).

Here are the obsolete tree repos for sme7.6

http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/
http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smecontribs/i386/RPMS/
http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smecontribs/x86_64/RPMS/
http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smeos/i386/SME/RPMS/
http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smeos/x86_64/SME/RPMS/
http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smeupdates/i386/RPMS/
http://distro.ibiblio.org/smeserver/releases/obsolete/7.6/smeupdates/x86_64/RPMS/

You can still manually download any rpms & dependencies using
wget http://packagelocation/packagename
& do a
yum localinstall packagename


Why you would still want sme7 rpms I am not sure, most are now in sme8 repos.

All the sme8 repos are here
http://distro.ibiblio.org/smeserver/releases/8.0/

The sme8 smecontribs repo is here
http://distro.ibiblio.org/smeserver/releases/8.0/smecontribs/
http://distro.ibiblio.org/smeserver/releases/8.0/smecontribs/i386/RPMS/
http://distro.ibiblio.org/smeserver/releases/8.0/smecontribs/x86_64/RPMS/

smeserver-dar2 is available there

Also why do you need the DAR2 contrib, the built in backup to workstation does the same job when doing a full system backup ?
« Last Edit: July 08, 2013, 01:32:37 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #8 on: July 08, 2013, 01:16:02 AM »
pc_doc

Quote
As I can't remove some of the contribs which may break 8....

Why not, what is stopping you removing any incompatible contribs ?

yum remove packagename
or if that is failing then use
rpm -e packagename
(you may also need to do the same for any dependencies, & in the correct order, one by one)
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline pcdoc

  • *
  • 56
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #9 on: July 08, 2013, 07:30:40 AM »
idp_qbn, thank you for the post. I am aware of EOL for 7.6

As I explained in my post, I have some clients who needed a lot of push to get the go ahead for expenditure to purchase hard drives even.

I also have 2 clients who have legacy systems (web pages) that require php4 and will not work under php5.

Janet, thank you for your post. If you read my post regarding the BaseURL you may notice I had pointed them to an /obsolete/7.6/ path. I have disabled smeaddons amongst others but unless I can get it to smeos repo's there is little point.

Thank you for information, but as stated before, these servers are for non-profit and charity institutes. I only charge for parts, not for my time. Going through and searching out all dependancies for these packages, removing them, updating to sme8 and finding it broken might be ok if it was my own server, or that of a paying customer, but I cannot afford to send one of my techs, or myself out into the field and spend an inordinate amount of time hoping it works as I don't charge for labour with these customers.

All your information is helpful, but the original question was why is it broken, and what can we do to fix it, not just ignore the problem.

Could future posters concentrate on helping to rectify the issue.

Thank you.
There are 10 types of people in this world,
   Those that know binary, and those who don't!

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #10 on: July 08, 2013, 08:27:12 AM »
pcdoc

I do not understand why you are trying to access 7.6 repos.
You are upgrading to sme 8 using a CD, the upgrade should automatically happen.

Most contribs are still compatible so you can upgrade those seperately AFTER the sme8 upgrade has completed ie from el4 to el5 versions.
Use rpm -e to remove anything you feel necessary to remove, it can be done remotely by ssh before you even visit the site, if time & personnel expertise issues are involved.

You obviously are getting an error message, so what command have you issued and when is it that you see these sme7.6 repo errors ?

I believe all my answers are appropriate, your question or problem is not so clear so please explain more carefully.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline pcdoc

  • *
  • 56
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #11 on: July 08, 2013, 12:57:52 PM »
I am going to test 2 sites out that use different contribs, the zarafa one is the one I am most concerned about.

I will break the mirror, put 1 driving into a box with similar hardware and try the upgrade. As some of these boxes have not had updates done for a while, I just have to cross fingers and toes and see what happens.

I have downloaded smeos, smeupdates and smecontribs repos and have stored them on my server as a share. Hopefully I might be able to get more clues as to why I am getting the error "cannot find a valid BaseURL".

As far as I am concerned, that is the error I am trying to fix, and what the original post was about. Not just a way to (hopefully) update to SME8 from a configured and active SME7.6 box.

I am still researching the upgrade of zarafa from 6.40 to 7.1. I have two VM's setup to test how that goes. I have looked at the script for migrating the database to the current version and will test extensively. If it is successful, I will see about posting the actions required onto the zarafa for sme8 page.
There are 10 types of people in this world,
   Those that know binary, and those who don't!

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #12 on: July 08, 2013, 01:15:01 PM »
pcdoc

Did you read what I asked you to tell us ?

Quote
I have downloaded smeos, smeupdates and smecontribs repos and have stored them on my server as a share. Hopefully I might be able to get more clues as to why I am getting the error "cannot find a valid BaseURL".

I said in my previous answer ..... so what command have you issued and when is it that you see these sme7.6 repo errors ?

Quote
As far as I am concerned, that is the error I am trying to fix, and what the original post was about.


The original question that started this thread was:
"Is there any way to identify the contrib packages to uninstall vs. base SME packages that I don't want to remove? "

You jumped in on this thread.

Your question then was:
"I am getting the same "Cannot find a vaild baseurl for repo" issue as you are reporting."

AFAIK that will happen because the repos no longer exist.
I'm not sure whether they are accessible using yum (I suspect not but have not tried it myself on sme7.6).
I did read that the advice was to download any rpms manually using wget, that may be required for upgrades or reinstalls or whatever purpose.

I advise you to use wget & do a yum localinstall


As far as upgrading sme7.x servers to sme8 is concerned, I strongly advise you to upgrade to version 7.6 first, then you should have a smooth upgrade to sme8. I seem to recall reading this advice here previously.
AFAIK you will need to manually download all the packages from the obsolete repos, then do a yum localinstall after you cd to the folder where the packages are. Forget about using yum via repos.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline jim7jim

  • **
  • 61
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #13 on: July 08, 2013, 02:59:50 PM »
OK, so I tried your suggestion and logged in using Alt-F2. If I execute: 'yum provides mod_imap.so' I get:

[root@test-email ~]# yum provides mod_imap.so
Loaded plugins: fastestmirror, protect-packages, smeserver
Loading mirror speeds from cached hostfile
 * smeaddons: smeserver.bhs.mirrors.ovh.net
 * smeextras: smeserver.bhs.mirrors.ovh.net
 * smeos: smeserver.bhs.mirrors.ovh.net
 * smeupdates: smeserver.bhs.mirrors.ovh.net
httpd-2.0.52-49.ent.centos4.i386 : Apache HTTP Server
Repo        : installed
Matched from:
Other       : Provides-match: mod_imap.so


Quote
Before the upgrade, did you actually look to see if you have any custom templates setup
Nothing is listed under: /etc/e-smith/templates-custom/

When logging into the upgraded hard drive, it's reporting that I'm at v7.6 instead of v8. So maybe the update didn't take?

As I understand it, I need to uninstall something but I'm not sure what to uninstall? I shouldn't have to uninstall the Apache server should I (httpd-2.0.52-49.ent.centos4.i386 : Apache HTTP Server) ?

Also, I was able to capture the other error message I see on boot, which is:
udevd[565]: add_to_rules: Invalid KERNEL operation
udevd[565]: add_to_rules: invalid rule 'etc/udev/rules.d/51-by-id.rules:1'


cat 51-by-id.rules file:
KERNEL="dasd*[!0-9]", PROGRAM="/sbin/dasd_id", SYMLINK="disk/by-id/ccw-%c"
KERNEL="dasd*[0-9]", PROGRAM="/sbin/dasd_id", SYMLINK="disk/by-id/ccw-%c-part%n"
KERNEL="sd*[!0-9]", PROGRAM="/sbin/scsi_id", SYMLINK="disk/by-id/scsi-%c"
KERNEL="sd*[0-9]", PROGRAM="/sbin/scsi_id", SYMLINK="disk/by-id/scsi-%c-part%n"
KERNEL="nst[0-9]*", PROGRAM="/sbin/scsi_id", SYMLINK="tape-id/by-id/scsi-%c-nst"
KERNEL="st[0-9]*", PROGRAM="/sbin/scsi_id", SYMLINK="tape-id/by-id/scsi-%c-st"

KERNEL="cciss?c", PROGRAM="/sbin/scsi_id", SYMLINK="disk/by-id/scsi-%c-cciss"
KERNEL="cciss*p[0-9]*", PROGRAM="/sbin/scsi_id", SYMLINK="disk/by-id/cciss-%c-part%n"

KERNEL="sd*", PROGRAM="/sbin/path_id", SYMLINK="disk/by-path/%c"
KERNEL="hd*", PROGRAM="/sbin/path_id", SYMLINK="disk/by-path/%c"
KERNEL="dasd*", PROGRAM="/sbin/path_id", SYMLINK="disk/by-path/%c"
KERNEL="nst*", PROGRAM="/sbin/path_id", SYMLINK="tape-id/by-path/%c"
KERNEL="st*", PROGRAM="/sbin/path_id", SYMLINK="tape-id/by-path/%c"
KERNEL="cciss*", PROGRAM="/sbin/path_id", SYMLINK="disk/by-path/%c"

KERNEL="sg*", SYSFS{type}="8", PROGRAM="/sbin/scsi_id", SYMLINK="tape-id/by-id/scsi-%c-changer"


Since the server still reports as v7.6 I'm guessing the update didn't take. The fact that the 'yum provides' command now works leads me to believe that at least something upgraded. I looked in the upgrade.log file and didn't see anything too sinister although there were a lot of warnings. I saw this warning about http.conf:
Upgrading httpd-0:2.0.52-41.ent.2.centos4.i386.
warning: /etc/httpd/conf/httpd.conf created as /etc/httpd/conf/httpd.conf.rpmnew


Not sure what my next step should be?

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Removing installed contribs before update to SME8
« Reply #14 on: July 08, 2013, 03:31:22 PM »
jim7jim

I suggest you run the sme8 upgrade from CD again.
Make sure to run the CD check test when prompted to make sure the iso download & CD burn is good.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.