You are not logged in.

#1 2006-03-23 15:37:02

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Simulate upgrade process

is there a way in Arch to simulate upgrade process pacman -Syu, that is it will show what will be done to the system without physically touching any files?
When you are maintaining a production server sometimes it's real scarry to run pacman -Syu especially after not updating system in a while, because the possibility that something will go wrong is rather high.

It would be nice to test the upgrade process first and only upgrade when it's safe to do so.

Any suggestions how to make a simulation upgrade like this (without having identical machine or system residing on other partition)


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#2 2006-03-23 16:29:20

PJ
Member
From: Sweden
Registered: 2005-10-11
Posts: 602

Re: Simulate upgrade process

I have an idea for this kind of stuff. It is based on using unionfs with the system in read-only mode and place all new files a temporary directory/partion which is writeable. This will hopefully work as a simulation. The problem is that I have been kind of busy with school and I haven't had any free time to verify if my idea works. Hopefully I will have some free time in a couple of weeks.

Offline

#3 2006-03-23 16:32:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Simulate upgrade process

You can just hit "n" after an -Syu.  If you really want:

yes 'n' | pacman -Su

will not touch any files (the -Sy will update DB files, so you can leave that off)

Offline

#4 2006-03-23 16:46:01

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: Simulate upgrade process

phrakture, that's not what i exactly want to do. I'm looking for something like apt-get --simulate which will do the actual simulation of upgrade and report any broken dependencies/packages that can happen during the process, not the list of packages to upgrade.

At the moment one could make an image of hard disk to another partition/hd and then simulate an upgrade, but im lookin for an easier and quicker solution to this.

Simulation is definetly very helpful in production environments when i can't really afford a downtime.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#5 2006-03-23 16:55:22

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Simulate upgrade process

pixel wrote:

Simulation is definetly very helpful in production environments when i can't really afford a downtime.

There's always other options - just use a test machine.  The people that I know of that use arch in business situations do that - one machine to test upgrades, when they work, they move the upgrades to a custom repo and let the rest of the machines upgrade from it.

Offline

#6 2006-03-23 17:19:44

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: Simulate upgrade process

phrakture wrote:
pixel wrote:

Simulation is definetly very helpful in production environments when i can't really afford a downtime.

There's always other options - just use a test machine.  The people that I know of that use arch in business situations do that - one machine to test upgrades, when they work, they move the upgrades to a custom repo and let the rest of the machines upgrade from it.

Ok, i know very well there are other options like a test machine, partition image or qemu virtual machine, BUT i'm looking for a quick solution like apt-get --simulate, a quick and efficient way to simulate an upgrade process.
Any suggestions will be welcomed.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#7 2006-03-23 18:06:47

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Simulate upgrade process

pixel wrote:

Ok, i know very well there are other options like a test machine, partition image or qemu virtual machine, BUT i'm looking for a quick solution like apt-get --simulate, a quick and efficient way to simulate an upgrade process.
Any suggestions will be welcomed.

The reason I've been pushing for other alternatives is that there is no way to do this built into pacman.  There are multiple ways to do the same thing (test machine, chroot environment, etc etc), but as it stands there is no standard way.  There are no parameters to pacman to do it, pacman is not apt-get (thank god).

But in all seriousness, in a production environment you should *always* have a test machine.

Offline

#8 2006-03-24 09:51:51

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: Simulate upgrade process

phrakture wrote:

But in all seriousness, in a production environment you should *always* have a test machine.

IMHO also in non-production environment it's good to have some sort of simulation environment to test new upgrades.
So as i see it right now the easiest way to implement this is to:
1. copy system partitions to another partition with cp -a or rsync -a (to preserve symlinks, ownership etc)
2. add an entry to lilo/grub to boot from this image partition
3. boot into the new partition and upgrade
4. watch for errors and broken packages.


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#9 2006-03-24 19:09:49

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Simulate upgrade process

It's always good to have one more computer than you can afford.  :twisted:

Offline

Board footer

Powered by FluxBB