Re: Reipl support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jul 21, 2008, at 11:36 AM, Mark Hamzy wrote:

Hello,

I am working on a feature for the 390 architecture called reipl. It allows the vm to be rebooted into a specific partition. On scenario where this would be usefull is after the initial install, the vm should boot from the newly installed partition and not from the reader (where it initially booted from).

It constists of three peices.

1) A Python module, Reipl.py, which reads and writes the settings from the firmware (among other things).


Can Reipl.py's functionality be incorporated in to booty rather than making a new tool? Booty is the cross-platform python tool for making the system bootable, which usually means installing a boot loader.

2) A patch to anaconda main python module. At the end of the installation, it will call Reipl.py with the boot partition. It will then write the success of reipl into a file called /var/run/sigusr. 3) A patch to anaconda's loader to read the file /var/run/sigusr and send the appropriate signal (either shutdown or reboot) to linuxrc process.

Open issues:
1) Currently, Reipl.py is hard installed into /usr/sbin. I would like to create an rpm package for Reipl consisting of just that file. Is /usr/sbin a good place for it?

2) /usr/sbin is not in sys.path. I have to append sys.path before importing Reipl. Is this okay?

Are there any other issues with this code?


Comments:

As stated above, can the functionality of Reipl.py become part of booty rather than making a new system-specific tool? I'm thinking about maintenance in the future and if Reipl.py is its own tool, it could easily be forgotten.

1) For the command portion of Reipl, if you were to move the knowledge of how to do things in to booty so we can centralize that sort of code, I would suggest finding a home for the frontend program in s390utils.

2) rhpl.getArch() has been replaced in rawhide with functions in iutil. iutil.isS390() would be my preferred method to test if you are on an s390 platform.

3) We don't generally leave 'import pdb ; pdb.set_trace()' statements in the code we commit, so make sure those aren't around.

4) I would wrap the open/write/close to /var/run/sigusr in a try- except block since that could fail. Also, I suggest using fp.write() to write lines to a file rather than print. Two reasons. First is consistency with the rest of the anaconda code. Second is that the print statement will go away in Python 3000 and the fewer of those we have to rewrite in the future, the better.

5) If you see a use of atoi() in loader's code, feel free to change it to strtol() with error checking. I mention this because I see the first atoi() in this patch and notice it could be zero if atoi() fails, which means kill() is called with pid value 0 sending SIGUSR1 to all processes currently running.

Beyond that, making sure the patch applies against rawhide is key. I realize for s390x, we have a unique situation. Feel free to continue working against RHEL5, but make sure the patch ports to rawhide (at least until we have a rawhide s390 playground).

Thanks,

--
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux