Compare commits

..

73 Commits

Author SHA1 Message Date
daniceexi 441261bb2f defect 2966: fixed the issue that xcat pid files were put in /tmp/xcat which would be cleaned periodically. now move it to /var/run/xcat
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14499 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-30 09:09:00 +00:00
phamt 80dbeffa85 Fixed bug in getmacs.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14484 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-29 21:20:23 +00:00
daniceexi 39123d48ac defect 3131: fix the msg of dracut version
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14468 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-29 02:56:13 +00:00
phamt b8c42d07ae Fixed bug in add node and allow z/VM hosts to be added.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14462 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-28 16:19:27 +00:00
zhaoertao 7368174669 modifying 'rscan -u' to append the 'groups' attribute rather than overwrite it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14455 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-28 08:05:01 +00:00
bp-sawyers 3b64245ca6 Added the requires for perl-IO-Stty back in for ppc64
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14450 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 22:25:06 +00:00
phamt 8311f248fb Fixed rscan bug where node = parent.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14449 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 21:23:04 +00:00
jbjohnso 82b0440a02 Add boot device probing to suse
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14446 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 20:17:48 +00:00
jbjohnso e889ef17b1 Fix problem where EFI based installs failed to correctly place boot partition
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14445 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 19:25:09 +00:00
jbjohnso a815abaaed Fix a problem in the boot partition in rhel
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14444 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 19:25:00 +00:00
jbjohnso ec266f7000 Have RedHat installs reduce risk of overwriting SAN volumes. The strategy:
BIOS drive 80 is chosen if at all possible (don't know EFI way yet)
Failing that, first virtio block device
Failing that, then first block device served by ata_piix4, ahci, megaraid_sas, pmcraid
Failing that, first mptsas or mpt2sas
Failing that, first block device

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14443 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 19:24:54 +00:00
jbjohnso 4633498a4b Provide a hook for TLS cert delivery by updates.img.
Note this is of little use in a PXE environment today, as MITM to the initrd or ipxe subverts all of this.
This however is interesting for secure boot environments and remote media boot strap to provide an unbroken trust chain

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14442 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-27 19:24:48 +00:00
phamt 0a521cb31a Added missing option for disk pool in chhypervisor.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14431 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-26 17:55:47 +00:00
phamt 31323d58fa Added zVM specific options to chhypervisor man page.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14430 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-26 17:53:30 +00:00
phamt a1e1afdb9e Added zVM specific options to chhypervisor man page.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14429 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-26 17:09:40 +00:00
phamt b0a21076e9 Fixed webportal bug where dasd list entry only contains 1 device. Renamed chhypervisor --smapi to --smcli.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14428 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-26 16:41:31 +00:00
zhaoertao 4b5a7005b1 add LCD info with 'rvitals <node> all' for Firebird blade
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14417 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-23 11:07:12 +00:00
jbjohnso 3860a56041 Break slpdiscover activity into pieces to increase odds of success of each pass
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14389 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-21 19:58:56 +00:00
jbjohnso 7f5e911c2a Fix slpdiscover error output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14388 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-21 19:58:50 +00:00
jbjohnso 180ba59b72 Fix problem where mktoolscenter presumes a filename scheme that is not likely to be found in the wild anymore
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14384 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-21 16:50:39 +00:00
jjhua 5e5710ad4e If the timezone includes a space, the chtab command below will not work. fix it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14382 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-21 08:54:16 +00:00
jbjohnso 79deb0acf5 Fix problem where 'delEntries' failed to invalidate cached data
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14373 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-20 14:51:52 +00:00
jbjohnso 42cb10b6aa Fix problem where a Table object with alternate autocommit setting would not have cache expired by peer activity.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14371 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-20 14:45:41 +00:00
immarvin 4b8ed14152 remove geninitrd, use genimage --onlyinitrd instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14368 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-20 07:17:54 +00:00
immarvin 4854e5ca69 remove geninitrd, use genimage --onlyinitrd instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14367 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-20 07:15:18 +00:00
immarvin 7f0e7d53ef remove geninitrd, use genimage --onlyinitrd instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14366 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-20 07:03:00 +00:00
phamt ac5654aae4 Changed default template to use M-disk space as swap instead of V-disk space.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14362 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-19 14:43:06 +00:00
nott 1a5bb68586 fix hierarchical mksysb creation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14352 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-16 15:43:16 +00:00
phamt d65d73f9e4 Added chhypervisor --smapi option for z/VM.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14342 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-15 19:59:56 +00:00
phamt fa973b8fd1 Fixed action bar sizing
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14339 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-15 16:46:28 +00:00
phamt 2d3d927056 Synched up 2.7 branch with trunk for z/VM.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14338 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-15 16:11:52 +00:00
phamt d82ee6e7f2 Synched up 2.7 branch with trunk for z/VM.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14337 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-15 15:57:05 +00:00
xq2005 e63d9a9967 delete the old dump file before creating the dump file
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14335 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-15 08:51:58 +00:00
xq2005 a0bd8f6a46 support kdump on sles10 on system p
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14333 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-15 06:03:00 +00:00
xq2005 9d55a3b3c1 support kdump for sles10 on blacktip
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14328 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-14 17:03:30 +00:00
nott 34f16337a1 no root password for diskful spot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14326 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-14 14:41:00 +00:00
immarvin 6521a0df7e corrected #3170 sles10.4: copycds need -n sles10.4 to set the os level
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14313 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-13 06:39:11 +00:00
zhaoertao 9af37d48bb hwctrldispatch only be used for IBM Flex System
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14305 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-12 07:29:56 +00:00
bp-sawyers 7bb0967496 Backport 2 genimage fixes from 2.8: 1) genimage with osimage prints empty values for os, profile, interface 2) genimage prints a blank line between every line of output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14300 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 17:22:20 +00:00
bp-sawyers 3f8c9bced2 changed dhcp require to /usr/sbin/dhcpd so it is correct on sles too
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14299 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 16:47:02 +00:00
xq2005 21d1017f86 support kdump on sles10
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14297 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 10:13:57 +00:00
zhaoertao 08a7dc5c78 correct site attribute name hdctldispatch to hwctrldispatch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14294 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 06:11:08 +00:00
zhaoertao bf2247a181 rename dfmdispatch to hdctldispatch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14292 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 06:03:24 +00:00
daniceexi 52e71591be Changed to suppot multiple disks for a vm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14291 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 05:58:00 +00:00
wanghuaz b3c477dd6f Removed rsct.lapi on AIX for hpc integration
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14289 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 05:12:21 +00:00
xq2005 c7cae12392 insserv with -f option to ignore the dependency on sles10.4
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14285 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 03:37:12 +00:00
zhaoertao f8c5b0c53b add attribute 'dfmdispatch' for site table to enable or disable the DFM hdwr_ctrl dispatch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14283 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-09 03:18:02 +00:00
wanghuaz 72cbbc912d Issue trustchk command to ensure /etc/security/privcmds has the correct permissions
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14279 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-08 10:18:19 +00:00
immarvin d2f0431829 remove geninitrd man page
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14278 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-08 09:42:38 +00:00
immarvin d18d235f1d remove geninitrd man page
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14277 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-08 09:42:06 +00:00
immarvin aa1fcd2493 fixed defect #3130 installnic=mac does not work for rh5 ppc64 netboot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14275 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-08 09:03:26 +00:00
zhaoertao ac28aa7e16 fix bug 3164:"rinv <cec> deconfig" can not print out the deconfig resources
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14269 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-08 02:16:07 +00:00
nott b8b4c75c39 fix NIM if1 parsing and chk_resolv_conf (3162 & 3163)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14267 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-07 18:27:13 +00:00
wanghuaz d31122325b Remove openshmem on AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14261 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-07 06:14:54 +00:00
wanghuaz bc7491ebde pe 1.2.0.0 packages on AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14258 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-06 13:53:52 +00:00
daniceexi 3e3eb858e5 added displaying of host which vm belongs to; added change for rmigrate; fixed issue of cpu configure during mkvm/chvm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14256 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-06 08:52:34 +00:00
jbjohnso 55b09cf8b5 Have IPMI plugin detect whether something is an ITE or not
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14252 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 16:20:34 +00:00
jbjohnso 15316700a9 Remove dead code resulting to changing to property api
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14251 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 16:20:24 +00:00
jbjohnso be879dd88e Fix glaring mistake in previous commit where 'FAILED' and 'all good' were indistinguishable
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14249 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 14:56:54 +00:00
jbjohnso 8c19948f3b Have IPMI more decisively quite should the password be incorrect. Hypothetically a DoS could be aimed at the client, but that's much less likely.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14248 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 14:56:46 +00:00
jbjohnso 4106dec47e Instead of randomizing each retry, just randomize the first to get things spread out then do the triangular progression timeout
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14247 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 14:56:38 +00:00
jbjohnso 7c7b6330ed Apply another algorithm to avoid sequence number reuse as much as possible
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14246 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 14:56:31 +00:00
jbjohnso 72c0326c2e Have IPMI.pm explicitly not expect cmd netfn after receiveng cmd/netfn response
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14245 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 14:56:23 +00:00
daniceexi c1bf69de94 fixed the approach to search objects in getrvidparms
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14238 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-05 02:38:45 +00:00
jbjohnso 8935e432a2 Improve reliability of duplicate response detection phase 1, also check netfn and command match
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14227 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-02 13:51:25 +00:00
phamt 95cb15d18e git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14224 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd 2012-11-02 12:08:10 +00:00
zhaoertao d1c2a26b2b update manpage for getmacs -i ethN|enN
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14221 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-02 09:25:07 +00:00
jbjohnso eedb72cac5 Output the FRU number of fru devices when available
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14216 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-02 01:18:40 +00:00
jbjohnso ae81e14bed Actually put out the adapter WWN and MAC addresses with Flex ITE nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14215 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-02 01:18:33 +00:00
jbjohnso 1dab5cbb5b Support WWN and Macs of Flex ITE nodes in rinv, haven't *quite* gotten the mezz adapters outputting yet, but they are being retrieved
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14214 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-02 01:18:28 +00:00
jbjohnso a10635241e Change cache versioning strategy, track the oem byte from fru locator records
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14213 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-02 01:18:22 +00:00
jbjohnso fd8ebe93b8 Add sfc driver to genesis
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14206 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-01 20:07:26 +00:00
jbjohnso 45a2783186 Add mstflint for IB servicing
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14201 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-11-01 13:22:54 +00:00
61 changed files with 5625 additions and 1637 deletions
+8 -2
View File
@@ -287,15 +287,21 @@ sub deconfig {
my $Location_code;
my $RID;
my $TYPE;
if(ref($node->{GARDRECORD}) ne "ARRAY") {
my $dres;
if (ref($node->{GARDRECORD}) eq "ARRAY") {
$dres = $node->{GARDRECORD};
} elsif (ref($node->{GARDRECORD}) eq "HASH") {
push @$dres, $node->{GARDRECORD};
} else {
push @result,[$name,"NO Deconfigured resources", 0];
return( \@result );
}
push @result,[$name,"Deconfigured resources", 0];
push @result,[$name,"Location_code RID Call_Out_Method Call_Out_Hardware_State TYPE", 0];
push @result,[$name,"$node->{Location_code} $node->{RID}", 0];
foreach my $unit(@{$node->{GARDRECORD}}) {
#foreach my $unit(@{$node->{GARDRECORD}}) {
foreach my $unit(@$dres) {
while (my ($key, $unit3) = each(%$unit) ) {
if($key eq "GARDUNIT") {
+3
View File
@@ -848,6 +848,9 @@ site => {
" match the path in the installdir attribute.\n\n".
" ipmidispatch: Whether or not to send ipmi hw control operations to the service\n".
" node of the target compute nodes. Default is 'y'.\n\n".
" hwctrldispatch: Whether or not to send hw control operations to the service\n".
" node of the target nodes. Default is 'y'.(At present, this attribute\n".
" only be used for IBM Flex System)\n\n".
" ipmimaxp: The max # of processes for ipmi hw ctrl. The default is 64. Currently,\n".
" this is only used for HP hw control.\n\n".
" ipmiretries: The # of retries to use when communicating with BMCs. Default is 3.\n\n".
+11 -1
View File
@@ -299,7 +299,11 @@ sub handle_dbc_request {
$opentables{$tablename}->{$autocommit} = xCAT::Table->new(@args);
}
if ($opentables{$tablename}->{$autocommit}) {
return 1;
if ($opentables{$tablename}->{$autocommit^1}) {
$opentables{$tablename}->{$autocommit}->{cachepeer}=$opentables{$tablename}->{$autocommit^1};
$opentables{$tablename}->{$autocommit^1}->{cachepeer}=$opentables{$tablename}->{$autocommit};
}
return 1;
} else {
return 0;
}
@@ -312,6 +316,10 @@ sub handle_dbc_request {
unless ($opentables{$tablename}->{$autocommit}) {
return undef;
}
if ($opentables{$tablename}->{$autocommit^1}) {
$opentables{$tablename}->{$autocommit}->{cachepeer}=$opentables{$tablename}->{$autocommit^1};
$opentables{$tablename}->{$autocommit^1}->{cachepeer}=$opentables{$tablename}->{$autocommit};
}
}
}
if ($functionname eq 'getAllAttribs') {
@@ -2096,6 +2104,7 @@ sub getNodesAttribs {
sub _refresh_cache { #if cache exists, force a rebuild, leaving reference counts alone
my $self = shift; #dbworker check not currently required
if ($self->{cachepeer}->{_cachestamp}) { $self->{cachepeer}->{_cachestamp}=0; }
if ($self->{_use_cache}) { #only do things if cache is set up
$self->_build_cache(1); #for now, rebuild the whole thing.
#in the future, a faster cache update may be possible
@@ -3243,6 +3252,7 @@ sub delEntries
$stmt->execute(@stargs);
$stmt->finish;
$self->_refresh_cache(); #cache is invalid, refresh
#notify the interested parties
if ($notif == 1)
{
+4 -2
View File
@@ -1070,16 +1070,18 @@ sub runcmd
my $errout;
open (PIPE, "$cmd |");
while (<PIPE>) {
push @$outref, $_;
chomp; # get rid of the newline, because the client will add one
if ($::CALLBACK){
$rsp->{data}->[0] = $_;
$::CALLBACK->($rsp);
} else {
xCAT::MsgUtils->message("D", "$_");
}
$output .= $_;
#$output .= $_;
}
# store the return string
push @$outref,$output;
#push @$outref,$output;
}
# now if not streaming process errors
+105 -12
View File
@@ -310,25 +310,19 @@ sub isZvmNode {
# Get inputs
my ( $class, $node ) = @_;
# zVM guest ID
my $id;
# Look in 'zvm' table
my $tab = xCAT::Table->new( 'zvm', -create => 1, -autocommit => 0 );
my @results = $tab->getAllAttribsWhere( "node like '%" . $node . "%'", 'userid' );
foreach (@results) {
# Get userID
$id = $_->{'userid'};
# Return 'TRUE' if given node is in the table
if ($id) {
return ('TRUE');
if ($_->{'userid'}) {
return 1;
}
}
return ('FALSE');
return 0;
}
#-------------------------------------------------------
@@ -722,7 +716,7 @@ sub getUserEntryWODisk {
return;
}
my $out = `ssh $hcp "$dir/getuserentry $userId" | grep -v "MDISK"`;
my $out = `ssh $hcp "$dir/smcli Image_Query_DM -T $userId" | sed '\$d' | grep -v "MDISK"`;
# Create a file to save output
open( DIRENTRY, ">$file" );
@@ -1111,12 +1105,12 @@ sub getUserProfile {
if ( $curTime > $fileTime + $interval ) {
# Get user profiles and save it in a file
$out = `ssh $hcp "$hcpDir/getuserprofile $profile > $file"`;
$out = `ssh $hcp "$hcpDir/smcli Profile_Query_DM -T $profile > $file"`;
}
} else {
# Get user profiles and save it in a file
$out = `ssh $hcp "$hcpDir/getuserprofile $profile > $file"`;
$out = `ssh $hcp "$hcpDir/smcli Profile_Query_DM -T $profile > $file"`;
}
# Return the file contents
@@ -1188,4 +1182,103 @@ sub getOsVersion {
}
return xCAT::zvmUtils->trimStr($os);
}
#-------------------------------------------------------
=head3 getZfcpInfo
Description : Get the zFCP device info
Arguments : Node
Returns : zFCP device info
Example : my $info = xCAT::zvmUtils->getZfcpInfo($node);
=cut
#-------------------------------------------------------
sub getZfcpInfo {
# Get inputs
my ( $class, $node ) = @_;
# Get zFCP device info
my $info = `ssh -o ConnectTimeout=2 $node "lszfcp -D"`;
my @zfcp = split("\n", $info);
if (!$info || $info =~ m/No zfcp support/i) {
return;
}
# Get SCSI device and their attributes
my $scsi = `ssh -o ConnectTimeout=2 $node "lsscsi"`;
$info = "";
my @args;
my $tmp;
my $id;
my $device;
my $wwpn;
my $lun;
my $size;
foreach (@zfcp) {
@args = split(" ", $_);
$id = $args[1];
@args = split("/", $args[0]);
$device = $args[0];
$wwpn = $args[1];
$lun = $args[2];
# Make sure WWPN and LUN do not have 0x prefix
$wwpn = xCAT::zvmUtils->replaceStr($wwpn, "0x", "");
$lun = xCAT::zvmUtils->replaceStr($lun, "0x", "");
# Find the device name
$tmp = `echo "$scsi" | egrep -i $id`;
$tmp = substr($tmp, index($tmp, "/dev/"));
chomp($tmp);
# Find the size in MiB
$size = `ssh -o ConnectTimeout=2 $node "sg_readcap $tmp" | egrep -i "Device size:"`;
$size =~ s/Device size: //g;
@args = split(",", $size);
$size = xCAT::zvmUtils->trimStr($args[1]);
$info .= "Device: $device WWPN: 0x$wwpn LUN: 0x$lun Size: $size\n";
}
$info = xCAT::zvmUtils->tabStr($info);
return ($info);
}
#-------------------------------------------------------
=head3 isHypervisor
Description : Determines if a given node is in the 'hypervisor' table
Arguments : Node
Returns : 1 Node exists
0 Node does not exists
Example : my $out = xCAT::zvmUtils->isHypervisor($node);
=cut
#-------------------------------------------------------
sub isHypervisor {
# Get inputs
my ( $class, $node ) = @_;
# Look in 'zvm' table
my $tab = xCAT::Table->new( "hypervisor", -create => 1, -autocommit => 0 );
my @results = $tab->getAllAttribsWhere( "node like '%" . $node . "%'", 'type' );
foreach (@results) {
# Return 'TRUE' if given node is in the table
if ($_->{"type"} eq "zvm") {
return 1;
}
}
return 0;
}
+1 -1
View File
@@ -30,7 +30,7 @@ I:ppe.loc.license
#I:ppedev.hpct
# LAPI
I:rsct.lapi
#I:rsct.lapi
#I:rsct.sci
# AIX bundle file for ESSL and PESSL packages
@@ -0,0 +1,9 @@
# AIX bundle package list for PE
# POE
#I:ppe.man
I:ppe.rte
I:ppe.loc.license
# PE HPC toolkit, needed on login node
#I:ppedev.hpct
+1 -1
View File
@@ -9,5 +9,5 @@ I:ppe.loc.license
#I:ppedev.hpct
# LAPI
I:rsct.lapi
#I:rsct.lapi
#I:rsct.sci
@@ -111,6 +111,10 @@ if [ "$OS" != "AIX" ]; then
chmod 400 $installroot/root/.ckpt.key
fi
# Ensure that the /etc/security/privcmds file has a complte set of entries.
if [ "$OS" == "AIX" ]; then
/usr/sbin/trustchk -ry ALL >/dev/null 2>&1
fi
# BSR configuration, uncomment the following lines to enable BSR configuration on Power Linux cluter.
#if [ "$OS" != "AIX" ]; then
-1
View File
@@ -347,7 +347,6 @@ legend {
.actionBar {
display: inline-table;
width: 50%;
}
.actionBar div {
+3 -3
View File
@@ -178,7 +178,7 @@ function loadUserTable(data) {
});
// Create action bar
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
var createLnk = $('<a>Create</a>');
createLnk.click(function() {
@@ -687,7 +687,7 @@ function configImagePanel(data) {
});
// Create action bar
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
// Create a profile
var createLnk = $('<a>Create</a>');
@@ -1193,7 +1193,7 @@ function configGroupPanel(data) {
});
// Create action bar
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
// Create a group
var createLnk = $('<a>Create</a>');
+442 -242
View File
@@ -200,16 +200,16 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
// Do not continue if error is found
if (data.rsp[0].indexOf('Error') > -1) {
var warn = createWarnBar(data.rsp[0]);
$('#' + tabId).append(warn);
return;
var warn = createWarnBar(data.rsp[0]);
$('#' + tabId).append(warn);
return;
}
// Get node inventory
var inv = data.rsp[0].split(node + ':');
// Create array of property keys
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'nic');
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'zfcp', 'nic');
// Create hash table for property names
var attrNames = new Object();
@@ -222,6 +222,7 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
attrNames['memory'] = 'Total Memory:';
attrNames['proc'] = 'Processors:';
attrNames['disk'] = 'Disks:';
attrNames['zfcp'] = 'zFCP:';
attrNames['nic'] = 'NICs:';
// Create hash table for node attributes
@@ -269,7 +270,10 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
*/
fieldSet = $('<fieldset id="' + node + '_monitor"></fieldset>');
legend = $('<legend>Monitoring [<a style="font-weight: normal; color: blue; text-decoration: none;">Refresh</a>]</legend>');
fieldSet.append(legend);
fieldSet.append(legend);
// var info = createInfoBar('No data available');
// fieldSet.append(info.css('width', '300px'));
getMonitorMetrics(node);
// Refresh monitoring charts on-click
@@ -457,6 +461,51 @@ zvmPlugin.prototype.loadServiceInventory = function(data) {
dasdTable.append(dasdBody);
item.append(dasdTable);
}
/**
* zFCP section
*/
else if (keys[k] == 'zfcp') {
// Create a label - Property name
label = $('<label>' + attrNames[keys[k]].replace(':', '') + '</label>');
item.append(label);
// Create a table to hold NIC data
var zfcpTable = $('<table></table>');
var zfcpBody = $('<tbody></tbody>');
// Table columns - Virtual device, Adapter Type, Port Name, # of Devices, MAC Address, and LAN Name
var zfcpTabRow = $('<thead class="ui-widget-header"> <th>Virtual Device #</th> <th>Port Name</th> <th>Unit Number</th> <th>Size</th></thead>');
zfcpTable.append(zfcpTabRow);
var zfcpVDev, zfcpPortName, zfcpLun, zfcpSize;
// Loop through each zFCP device
if (attrs[keys[k]]) {
for (l = 0; l < attrs[keys[k]].length; l++) {
if (attrs[keys[k]][l]) {
args = attrs[keys[k]][l].split(' ');
// Get zFCP virtual device, port name (WWPN), unit number (LUN), and size
zfcpVDev = $('<td>' + args[1].replace('0.0.', '') + '</td>');
zfcpPortName = $('<td>' + args[4] + '</td>');
zfcpLun = $('<td>' + args[7] + '</td>');
zfcpSize = $('<td>' + args[args.length - 2] + ' ' + args[args.length - 1] + '</td>');
// Create a new row for each zFCP device
zfcpTabRow = $('<tr></tr>');
zfcpTabRow.append(zfcpVDev);
zfcpTabRow.append(zfcpPortName);
zfcpTabRow.append(zfcpLun);
zfcpTabRow.append(zfcpSize);
zfcpBody.append(zfcpTabRow);
}
}
}
zfcpTable.append(zfcpBody);
item.append(zfcpTable);
}
/**
* NIC section
@@ -671,8 +720,8 @@ zvmPlugin.prototype.loadClonePage = function(node) {
if (!inputs.eq(i).val()
&& inputs.eq(i).attr('name') != 'diskPw'
&& inputs.eq(i).attr('name') != 'diskPool'
&& inputs.eq(i).attr('name') != 'ip'
&& inputs.eq(i).attr('name') != 'hostname') {
&& inputs.eq(i).attr('name') != 'ip'
&& inputs.eq(i).attr('name') != 'hostname') {
inputs.eq(i).css('border', 'solid #FF0000 1px');
ready = false;
} else {
@@ -915,10 +964,10 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Check for error
var error = false;
if (data.rsp[0].indexOf('Error') > -1) {
error = true;
var warn = createWarnBar(data.rsp[0]);
$('#' + tabId).append(warn);
error = true;
var warn = createWarnBar(data.rsp[0]);
$('#' + tabId).append(warn);
}
// Get node inventory
@@ -934,7 +983,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
statBar.hide();
// Create array of property keys
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'nic');
var keys = new Array('userId', 'host', 'os', 'arch', 'hcp', 'priv', 'memory', 'proc', 'disk', 'zfcp', 'nic');
// Create hash table for property names
var attrNames = new Object();
@@ -947,12 +996,13 @@ zvmPlugin.prototype.loadInventory = function(data) {
attrNames['memory'] = 'Total Memory:';
attrNames['proc'] = 'Processors:';
attrNames['disk'] = 'Disks:';
attrNames['zfcp'] = 'zFCP:';
attrNames['nic'] = 'NICs:';
// Create hash table for node attributes
var attrs;
if (!error) {
attrs = getAttrs(keys, attrNames, inv);
attrs = getAttrs(keys, attrNames, inv);
}
// Create division to hold user entry
@@ -1013,7 +1063,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Do not continue if error
if (error) {
return;
return;
}
/**
@@ -1033,7 +1083,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Create a label - Property name
label = $('<label>' + attrNames[keys[k]] + '</label>');
item.append(label);
for (var l = 0; l < attrs[keys[k]].length; l++) {
// Create a input - Property value(s)
// Handle each property uniquely
@@ -1073,7 +1123,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
label = $('<label>' + attrNames[keys[k]].replace(':', '') + '</label>');
item.append(label);
// Loop through each line
// Loop through each line
for (l = 0; l < attrs[keys[k]].length; l++) {
// Create a new list item for each line
hwItem = $('<li></li>');
@@ -1143,6 +1193,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Open dialog to confirm
var confirmDialog = $('<div><p>Are you sure you want to remove this processor?</p></div>');
confirmDialog.dialog({
title: "Confirm",
modal: true,
width: 300,
buttons: {
@@ -1249,6 +1300,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Open dialog to confirm
var confirmDialog = $('<div><p>Are you sure you want to remove this disk?</p></div>');
confirmDialog.dialog({
title: "Confirm",
modal: true,
width: 300,
buttons: {
@@ -1315,6 +1367,100 @@ zvmPlugin.prototype.loadInventory = function(data) {
item.append(dasdTable);
}
/**
* zFCP section
*/
else if (keys[k] == 'zfcp') {
// Create a label - Property name
label = $('<label>' + attrNames[keys[k]].replace(':', '') + '</label>');
item.append(label);
// Create a table to hold NIC data
var zfcpTable = $('<table></table>');
var zfcpBody = $('<tbody></tbody>');
var zfcpFooter = $('<tfoot></tfoot>');
/**
* Remove zFCP
*/
contextMenu = [ {
'Remove' : function(menuItem, menu) {
var addr = $(this).text();
var portName = $(this).parents('tr').find('td:eq(1)').text();
var unitNo = $(this).parents('tr').find('td:eq(2)').text();
// Open dialog to confirm
var confirmDialog = $('<div><p>Are you sure you want to remove this zFCP device?</p></div>');
confirmDialog.dialog({
title: "Confirm",
modal: true,
width: 300,
buttons: {
"Ok": function(){
removeZfcp(node, addr, portName, unitNo);
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
}
} ];
// Table columns - Virtual device, Adapter Type, Port Name, # of Devices, MAC Address, and LAN Name
var zfcpTabRow = $('<thead class="ui-widget-header"> <th>Virtual Device #</th> <th>Port Name</th> <th>Unit Number</th> <th>Size</th></thead>');
zfcpTable.append(zfcpTabRow);
var zfcpVDev, zfcpPortName, zfcpLun, zfcpSize;
// Loop through each zFCP device
if (attrs[keys[k]]) {
for (l = 0; l < attrs[keys[k]].length; l++) {
if (attrs[keys[k]][l]) {
args = attrs[keys[k]][l].split(' ');
// Get zFCP virtual device, port name (WWPN), unit number (LUN), and size
zfcpVDev = $('<td></td>');
zfcpLink = $('<a>' + args[1].replace('0.0.', '') + '</a>');
// Append context menu to link
zfcpLink.contextMenu(contextMenu, {
theme : 'vista'
});
zfcpVDev.append(zfcpLink);
zfcpPortName = $('<td>' + args[4] + '</td>');
zfcpLun = $('<td>' + args[7] + '</td>');
zfcpSize = $('<td>' + args[args.length - 2] + ' ' + args[args.length - 1] + '</td>');
// Create a new row for each zFCP device
zfcpTabRow = $('<tr></tr>');
zfcpTabRow.append(zfcpVDev);
zfcpTabRow.append(zfcpPortName);
zfcpTabRow.append(zfcpLun);
zfcpTabRow.append(zfcpSize);
zfcpBody.append(zfcpTabRow);
}
}
}
zfcpTable.append(zfcpBody);
/**
* Add zFCP device
*/
var addZfcpLink = $('<a>Add zFCP</a>');
addZfcpLink.bind('click', function(event) {
var hcp = attrs['hcp'][0].split('.');
openAddZfcpDialog(node, hcp[0]);
});
zfcpFooter.append(addZfcpLink);
zfcpTable.append(zfcpFooter);
item.append(zfcpTable);
}
/**
* NIC section
@@ -1339,6 +1485,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Open dialog to confirm
var confirmDialog = $('<div><p>Are you sure you want to remove this NIC?</p></div>');
confirmDialog.dialog({
title: "Confirm",
modal: true,
width: 300,
buttons: {
@@ -1381,7 +1528,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
args = attrs[keys[k]][l + 1].split(' ');
nicLanName = $('<td>' + args[args.length - 2] + ' ' + args[args.length - 1] + '</td>');
// Create a new row for each DASD
// Create a new row for each NIC
nicTabRow = $('<tr></tr>');
nicTabRow.append(nicVDev);
nicTabRow.append(nicType);
@@ -1545,12 +1692,40 @@ zvmPlugin.prototype.addNode = function() {
var addNodeForm = $('<div id="addZvm" class="form"></div>');
var info = createInfoBar('Add a z/VM node range');
addNodeForm.append(info);
addNodeForm.append('<div><label>Node range:</label><input type="text" name="node"/></div>');
addNodeForm.append('<div><label>User ID range:</label><input type="text" name="userId"/></div>');
addNodeForm.append('<div><label>IP address range (optional):</label><input name="ip" type="text"></div>');
addNodeForm.append('<div><label>Hostname range (optional):</label><input name="hostname" type="text"></div>');
addNodeForm.append('<div><label>Hardware control point:</label><input type="text" name="hcp"/></div>');
addNodeForm.append('<div><label>Groups:</label><input type="text" name="groups"/></div>');
// Create provision type drop down
var type = $('<div></div>');
var typeLabel = $('<label>Type:</label>');
var typeSelect = $('<select type="text" name="type"></select>');
typeSelect.append('<option value="vm" selected="selected">VM</option>');
typeSelect.append('<option value="host">Host</option>');
type.append(typeLabel);
type.append(typeSelect);
addNodeForm.append(type);
addNodeForm.append('<div><label>Node range *:</label><input type="text" name="node"/></div>');
addNodeForm.append('<div><label>User ID range *:</label><input type="text" name="userId"/></div>');
addNodeForm.append('<div><label>Hardware control point *:</label><input type="text" name="hcp"/></div>');
addNodeForm.append('<div><label>Groups *:</label><input type="text" name="groups"/></div>');
addNodeForm.append('<div><label>Operating system *:</label><input type="text" name="os"/></div>');
addNodeForm.append('<div><label>IP address range:</label><input name="ip" type="text"></div>');
addNodeForm.append('<div><label>Hostname range:</label><input name="hostname" type="text"></div>');
addNodeForm.append('<div><label>* required</label></div>');
// OS field only required for hosts
addNodeForm.find('input[name=os]').parent().hide();
// Toggle user Id on select
typeSelect.change(function(){
var selected = $(this).val();
if (selected == 'host') {
addNodeForm.find('input[name=userId]').parent().toggle();
addNodeForm.find('input[name=os]').parent().toggle();
} else {
addNodeForm.find('input[name=userId]').parent().toggle();
addNodeForm.find('input[name=os]').parent().toggle();
}
});
// Open form as a dialog
addNodeForm.dialog({
@@ -1563,213 +1738,166 @@ zvmPlugin.prototype.addNode = function() {
$(this).find('.ui-state-error').remove();
// Get inputs
var type = $(this).find('select[name=type]').val();
var nodeRange = $(this).find('input[name=node]').val();
var ipRange = $(this).find('input[name=ip]').val();
var hostnameRange = $(this).find('input[name=hostname]').val();
var userIdRange = $(this).find('input[name=userId]').val();
var userIdRange = $(this).find('input[name=userId]').val();
var os = $(this).find('input[name=os]').val();
var group = $(this).find('input[name=groups]').val();
var hcp = $(this).find('input[name=hcp]').val();
// Show warning message if inputs are not complete
if (!nodeRange || !userIdRange || !group || !hcp) {
var warn = createWarnBar('Please provide a value for each missing field!');
warn.prependTo($(this));
// Check required fields
if (type == 'host') {
if (!nodeRange || !os || !group || !hcp) {
var warn = createWarnBar('Please provide a value for each missing field!');
warn.prependTo($(this));
return;
}
} else {
// Check node range and user ID range
// Range can be given as gpok10-gpok20, gpok[10-20], or gpok10+10
var errMsg = '';
var ready = true;
if (nodeRange.indexOf('-') > -1 || userIdRange.indexOf('-') > -1) {
if (nodeRange.indexOf('-') < 0 || userIdRange.indexOf('-') < 0) {
errMsg = errMsg + 'A user ID range and node range needs to be given. ';
if (!nodeRange || !userIdRange || !group || !hcp) {
var warn = createWarnBar('Please provide a value for each missing field!');
warn.prependTo($(this));
return;
}
}
// Check node range and user ID range
// Range can be given as gpok10-gpok20, gpok[10-20], or gpok10+10
var errMsg = '';
var ready = true;
if (nodeRange.indexOf('-') > -1 || userIdRange.indexOf('-') > -1) {
if (nodeRange.indexOf('-') < 0 || userIdRange.indexOf('-') < 0) {
errMsg = errMsg + 'A user ID range and node range needs to be given. ';
ready = false;
} else {
var tmp = nodeRange.split('-');
// Get starting index
var nodeStart = parseInt(tmp[0].match(/\d+/));
// Get ending index
var nodeEnd = parseInt(tmp[1].match(/\d+/));
tmp = userIdRange.split('-');
// Get starting index
var userIdStart = parseInt(tmp[0].match(/\d+/));
// Get ending index
var userIdEnd = parseInt(tmp[1].match(/\d+/));
var ipStart = "", ipEnd = "";
if (ipRange != "" && ipRange != null) {
tmp = ipRange.split('-');
// Get starting IP address
ipStart = tmp[0].substring(tmp[0].lastIndexOf(".") + 1);
// Get ending IP address
ipEnd = tmp[1].substring(tmp[1].lastIndexOf(".") + 1);
}
var hostnameStart = "", hostnameEnd = "";
if (hostnameRange != "" && hostnameRange != null) {
tmp = hostnameRange.split('-');
// Get starting hostname
hostnameStart = parseInt(tmp[0].substring(0, tmp[0].indexOf(".")).match(/\d+/));
// Get ending hostname
hostnameEnd = parseInt(tmp[1].substring(0, tmp[1].indexOf(".")).match(/\d+/));
}
// If starting and ending index do not match
if (!(nodeStart == userIdStart) || !(nodeEnd == userIdEnd)) {
errMsg = errMsg + 'The node range and user ID range does not match. ';
ready = false;
}
// If an IP address range is given and the starting and ending index do not match
if (ipRange != "" && ipRange != null && (!(nodeStart == ipStart) || !(nodeEnd == ipEnd))) {
errMsg = errMsg + 'The node range and IP address range does not match. ';
ready = false;
}
// If a hostname range is given and the starting and ending index do not match
if (hostnameRange != "" && hostnameRange != null && (!(nodeStart == hostnameStart) || !(nodeEnd == hostnameEnd))) {
errMsg = errMsg + 'The node range and hostname range does not match. ';
ready = false;
} else {
var tmp = nodeRange.split('-');
// Get starting index
var nodeStart = parseInt(tmp[0].match(/\d+/));
// Get ending index
var nodeEnd = parseInt(tmp[1].match(/\d+/));
tmp = userIdRange.split('-');
// Get starting index
var userIdStart = parseInt(tmp[0].match(/\d+/));
// Get ending index
var userIdEnd = parseInt(tmp[1].match(/\d+/));
var ipStart = "", ipEnd = "";
if (ipRange) {
tmp = ipRange.split('-');
// Get starting IP address
ipStart = tmp[0].substring(tmp[0].lastIndexOf(".") + 1);
// Get ending IP address
ipEnd = tmp[1].substring(tmp[1].lastIndexOf(".") + 1);
}
var hostnameStart = "", hostnameEnd = "";
if (hostnameRange) {
tmp = hostnameRange.split('-');
// Get starting hostname
hostnameStart = parseInt(tmp[0].substring(0, tmp[0].indexOf(".")).match(/\d+/));
// Get ending hostname
hostnameEnd = parseInt(tmp[1].substring(0, tmp[1].indexOf(".")).match(/\d+/));
}
// If starting and ending index do not match
if (!(nodeStart == userIdStart) || !(nodeEnd == userIdEnd)) {
errMsg = errMsg + 'The node range and user ID range does not match. ';
ready = false;
}
// If an IP address range is given and the starting and ending index do not match
if (ipRange && !(nodeStart == ipStart) || !(nodeEnd == ipEnd)) {
errMsg = errMsg + 'The node range and IP address range does not match. ';
ready = false;
}
// If a hostname range is given and the starting and ending index do not match
if (hostnameRange && !(nodeStart == hostnameStart) || !(nodeEnd == hostnameEnd)) {
errMsg = errMsg + 'The node range and hostname range does not match. ';
ready = false;
}
}
}
// If there are no errors
if (ready) {
$('#addZvm').append(createLoader());
}
// If there are no errors
if (ready) {
$('#addZvm').append(createLoader());
// Change dialog buttons
$('#addZvm').dialog('option', 'buttons', {
'Close':function(){
$('#addZvm').dialog('close');
}
});
// If a node range is given
if (nodeRange.indexOf('-') > -1 && userIdRange.indexOf('-') > -1) {
var tmp = nodeRange.split('-');
// Get node base name
var nodeBase = tmp[0].match(/[a-zA-Z]+/);
// Get starting index
var nodeStart = parseInt(tmp[0].match(/\d+/));
// Get ending index
var nodeEnd = parseInt(tmp[1].match(/\d+/));
tmp = userIdRange.split('-');
// Get user ID base name
var userIdBase = tmp[0].match(/[a-zA-Z]+/);
// Change dialog buttons
$('#addZvm').dialog('option', 'buttons', {
'Close':function(){
$('#addZvm').dialog('close');
}
});
var ipBase = "";
if (ipRange != "" && ipRange != null) {
tmp = ipRange.split('-');
// Get network base
ipBase = tmp[0].substring(0, tmp[0].lastIndexOf(".") + 1);
}
// If a node range is given
if (nodeRange.indexOf('-') > -1 && userIdRange.indexOf('-') > -1) {
var tmp = nodeRange.split('-');
// Get node base name
var nodeBase = tmp[0].match(/[a-zA-Z]+/);
// Get starting index
var nodeStart = parseInt(tmp[0].match(/\d+/));
// Get ending index
var nodeEnd = parseInt(tmp[1].match(/\d+/));
tmp = userIdRange.split('-');
// Get user ID base name
var userIdBase = tmp[0].match(/[a-zA-Z]+/);
var domain = "";
if (hostnameRange != "" && hostnameRange != null) {
tmp = hostnameRange.split('-');
// Get domain name
domain = tmp[0].substring(tmp[0].indexOf("."));
}
// Loop through each node in the node range
for ( var i = nodeStart; i <= nodeEnd; i++) {
var node = nodeBase + i.toString();
var userId = userIdBase + i.toString();
var inst = i + '/' + nodeEnd;
var args = "";
if (type == 'host') {
args = node + ';zvm.hcp=' + hcp
+ ';nodehm.mgt=zvm;hypervisor.type=zvm;groups=' + group
+ ';nodetype.os=' + os;
} else {
args = node + ';zvm.hcp=' + hcp
+ ';zvm.userid=' + userId
+ ';nodehm.mgt=zvm' + ';groups=' + group;
}
var ipBase = "";
if (ipRange) {
tmp = ipRange.split('-');
// Get network base
ipBase = tmp[0].substring(0, tmp[0].lastIndexOf(".") + 1);
if (ipRange != "" && ipRange != null) {
var ip = ipBase + i.toString();
args += ';hosts.ip=' + ip;
}
var domain = "";
if (hostnameRange) {
tmp = hostnameRange.split('-');
// Get domain name
domain = tmp[0].substring(tmp[0].indexOf("."));
if (hostnameRange != "" && hostnameRange != null) {
var hostname = node + domain;
args += ';hosts.hostnames=' + hostname;
}
// Loop through each node in the node range
for ( var i = nodeStart; i <= nodeEnd; i++) {
var node = nodeBase + i.toString();
var userId = userIdBase + i.toString();
var inst = i + '/' + nodeEnd;
var args = node + ';zvm.hcp=' + hcp
+ ';zvm.userid=' + userId
+ ';nodehm.mgt=zvm' + ';groups=' + group;
if (ipRange) {
var ip = ipBase + i.toString();
args += ';hosts.ip=' + ip;
}
if (hostnameRange) {
var hostname = node + domain;
args += ';hosts.hostnames=' + hostname;
}
/**
* (1) Define node
*/
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
data : {
cmd : 'nodeadd',
tgt : '',
args : args,
msg : 'cmd=addnewnode;inst=' + inst + ';noderange=' + nodeRange
},
/**
* Return function on successful AJAX call
*
* @param data
* Data returned from HTTP request
* @return Nothing
*/
success : function (data) {
// Get ajax response
var rsp = data.rsp;
var args = data.msg.split(';');
// Get instance returned and node range
var inst = args[1].replace('inst=', '');
var nodeRange = args[2].replace('noderange=', '');
// If the last node was added
var tmp = inst.split('/');
if (tmp[0] == tmp[1]) {
// Update /etc/hosts
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
data : {
cmd : 'makehosts',
tgt : '',
args : '',
msg : ''
}
});
// Remove loader
$('#addZvm img').remove();
// If there was an error, do not continue
if (rsp.length) {
$('#addZvm').prepend(createWarnBar('Failed to create node definitions'));
} else {
$('#addZvm').prepend(createInfoBar('Node definitions created for ' + nodeRange));
}
}
}
});
}
} else {
var args = nodeRange + ';zvm.hcp=' + hcp
+ ';zvm.userid=' + userIdRange
+ ';nodehm.mgt=zvm' + ';groups=' + group;
if (ipRange)
args += ';hosts.ip=' + ipRange;
if (hostnameRange)
args += ';hosts.hostnames=' + hostnameRange;
// Only one node to add
/**
* (1) Define node
*/
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
@@ -1777,9 +1905,9 @@ zvmPlugin.prototype.addNode = function() {
cmd : 'nodeadd',
tgt : '',
args : args,
msg : 'cmd=addnewnode;node=' + nodeRange
msg : 'cmd=addnewnode;inst=' + inst + ';noderange=' + nodeRange
},
/**
* Return function on successful AJAX call
*
@@ -1791,38 +1919,110 @@ zvmPlugin.prototype.addNode = function() {
// Get ajax response
var rsp = data.rsp;
var args = data.msg.split(';');
var node = args[1].replace('node=', '');
// Get instance returned and node range
var inst = args[1].replace('inst=', '');
var nodeRange = args[2].replace('noderange=', '');
// Update /etc/hosts
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
data : {
cmd : 'makehosts',
tgt : '',
args : '',
msg : ''
// If the last node was added
var tmp = inst.split('/');
if (tmp[0] == tmp[1]) {
// Update /etc/hosts
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
data : {
cmd : 'makehosts',
tgt : '',
args : '',
msg : ''
}
});
// Remove loader
$('#addZvm img').remove();
// If there was an error, do not continue
if (rsp.length) {
$('#addZvm').prepend(createWarnBar('Failed to create node definitions'));
} else {
$('#addZvm').prepend(createInfoBar('Node definitions created for ' + nodeRange));
}
});
// Remove loader
$('#addZvm img').remove();
// If there was an error, do not continue
if (rsp.length) {
$('#addZvm').prepend(createWarnBar('Failed to create node definitions'));
} else {
$('#addZvm').prepend(createInfoBar('Node definitions created for ' + node));
}
}
});
}
} else {
// Show warning message
var warn = createWarnBar(errMsg);
warn.prependTo($(this));
}
} // End of else
} else {
var args = "";
if (type == 'host') {
args = nodeRange + ';zvm.hcp=' + hcp
+ ';nodehm.mgt=zvm;hypervisor.type=zvm;groups=' + group
+ ';nodetype.os=' + os;
} else {
args = nodeRange + ';zvm.hcp=' + hcp
+ ';zvm.userid=' + userIdRange
+ ';nodehm.mgt=zvm' + ';groups=' + group;
}
if (ipRange)
args += ';hosts.ip=' + ipRange;
if (hostnameRange)
args += ';hosts.hostnames=' + hostnameRange;
// Only one node to add
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
data : {
cmd : 'nodeadd',
tgt : '',
args : args,
msg : 'cmd=addnewnode;node=' + nodeRange
},
/**
* Return function on successful AJAX call
*
* @param data
* Data returned from HTTP request
* @return Nothing
*/
success : function (data) {
// Get ajax response
var rsp = data.rsp;
var args = data.msg.split(';');
var node = args[1].replace('node=', '');
// Update /etc/hosts
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
data : {
cmd : 'makehosts',
tgt : '',
args : '',
msg : ''
}
});
// Remove loader
$('#addZvm img').remove();
// If there was an error, do not continue
if (rsp.length) {
$('#addZvm').prepend(createWarnBar('Failed to create node definitions'));
} else {
$('#addZvm').prepend(createInfoBar('Node definitions created for ' + node));
}
}
});
}
} else {
// Show warning message
var warn = createWarnBar(errMsg);
warn.prependTo($(this));
}
},
"Cancel": function(){
$(this).dialog( "close" );
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -634,7 +634,7 @@ function loadNodes(data) {
$('#nodesTab').append(info);
// Create action bar
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
/**
* Create menu for actions to perform against a given node
@@ -877,7 +877,7 @@ function loadNodes(data) {
powerCol.unbind('click');
monitorCol.unbind('click');
commentCol.unbind('click');
// Create enough space for loader to be displayed
// Center align power, ping, and comments
$('#' + nodesTableId + ' td:nth-child(3),td:nth-child(4),td:nth-child(5)').css({
@@ -1204,7 +1204,7 @@ function addNodes2Table(data) {
break;
}
}
// Get node status
var status = '';
if (attrs[node]['status']){
@@ -1212,7 +1212,7 @@ function addNodes2Table(data) {
}
rows[nodeRowPos][headersCol['status']] = status;
// Go through each header
for (var key in headersCol) {
// Do not put comments and status in twice
@@ -1231,7 +1231,7 @@ function addNodes2Table(data) {
// This is done after datatable is updated because
// you cannot insert an object using fnUpdate()
var comments = attrs[node]['usercomment'];
// If no comments exists, show 'No comments' and
// set icon image source
var iconSrc;
@@ -1241,7 +1241,7 @@ function addNodes2Table(data) {
} else {
iconSrc = 'images/nodes/ui-icon-comment.png';
}
// Create icon for node comments
var tipID = node + 'Tip';
var commentsCol = $('#' + node).parent().parent().find('td').eq(5);
@@ -1261,7 +1261,7 @@ function addNodes2Table(data) {
icon.tooltip({
position: "center right",
offset: [-2, 10],
effect: "fade",
effect: "fade",
opacity: 0.8,
relative: true,
delay: 500
+1 -1
View File
@@ -617,7 +617,7 @@ function updateSelectNodeDiv() {
*/
function createActionMenu() {
// Create action bar
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css("width", "400px");
// Power on
var powerOnLnk = $('<a>Power on</a>');
+20 -6
View File
@@ -209,7 +209,7 @@ function loadImages(data) {
});
// Actions
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css("width", "370px");
var advancedLnk = '<a>Advanced</a>';
var advancedMenu = createMenu([copyCDLnk, generateLnk]);
@@ -236,8 +236,8 @@ function loadImages(data) {
* Enable editable columns
*/
// Do not make 1st column editable
$('#' + imgTableId + ' td:not(td:nth-child(1))').editable(
// Do not make 1st or 2nd columns editable
$('#' + imgTableId + ' td:not(td:nth-child(1),td:nth-child(2))').editable(
function(value, settings) {
// Get column index
var colPos = this.cellIndex;
@@ -1030,6 +1030,7 @@ function openEditImagePage(tgtImage) {
// Create an input for each definable attribute
var div, label, input, value;
var attrIndex = 0;
// Set node attribute
origAttrs[tgtImage]['imagename'] = tgtImage;
for (var key in defAttrs) {
@@ -1044,7 +1045,21 @@ function openEditImagePage(tgtImage) {
// Create label and input for attribute
div = $('<div></div>').css('display', 'inline');
label = $('<label>' + key + ':</label>').css('vertical-align', 'middle');
input = $('<input type="text" id="' + key + '" value="' + value + '" title="' + defAttrs[key] + '"/>').css('margin-top', '5px');
input = $('<input type="text" id="' + key + '" value="' + value + '" title="' + defAttrs[key] + '"/>').css({
'margin-top': '5px',
'float': 'none',
'width': 'inherit'
});
// There is an element called groups that will override the defaults for the groups attribute.
// Hence, the input must have use CSS to override the float and width.
// Split attributes into 3 per row
if (attrIndex > 0 && !(attrIndex % 3)) {
div.css('display', 'inline-block');
}
attrIndex++;
// Create server browser
switch (key) {
@@ -1177,8 +1192,7 @@ function openEditImagePage(tgtImage) {
$(this).css('border-color', 'blue');
});
div.append(label);
div.append(input);
div.append(label, input);
setPropsForm.append(div);
}
+3 -5
View File
@@ -559,7 +559,7 @@ function loadNodesTable(data) {
});
// Create action bar
var actionBar = $('<div class="actionBar"></div>');
var actionBar = $('<div class="actionBar"></div>').css('width', '370px');
// Prepend menu to datatable
var actionsLnk = $('<a>Actions</a>');
@@ -997,10 +997,8 @@ function setOSImageCookies(data) {
// Only save install boot
if (provMethod.indexOf('install') > -1) {
if (!osComments) {
osComments = "No descritption";
imageNames.push(osImage + ':' + osComments);
} else {
if (osComments) {
// Only enable images where description and selectable comments exist
// Set default description and selectable
selectable = "no";
desc = "No description";
+15
View File
@@ -1056,3 +1056,18 @@ function getNodesChecked(datatableId) {
return tgts;
}
/**
* Check if return message contains errors
*
* @param msg Return message
* @return 0 If return message contains no errors
* -1 If return message contains errors
*/
function containErrors(msg) {
if (msg.indexOf('Failed') > -1 || msg.indexOf('Error') > -1) {
return -1;
} else {
return 0;
}
}
+17 -7
View File
@@ -234,10 +234,6 @@ sub provzlinux {
# Set nodetype definitions
$out = `chtab node=$node noderes.netboot=zvm nodetype.nodetype=osi nodetype.provmethod=install nodetype.os=$os nodetype.arch=$arch nodetype.profile=$profile nodetype.comments="owner:$owner"`;
# Update hosts table and DNS
`makehosts`;
`makedns`;
# Create user directory entry replacing LXUSR with user ID
# Use /opt/zhcp/conf/default.direct on zHCP as the template
# USER LXUSR PSWD 512M 1G G
@@ -265,9 +261,18 @@ sub provzlinux {
# Read XML file
my $data = $xml->XMLin($tmpl);
my $devices = $data->{'dasd'}->{'devices'}->{'listentry'};
foreach (@$devices) {
my $devices_ref = $data->{'dasd'}->{'devices'}->{'listentry'};
my @devices;
if (ref($devices_ref) eq 'HASH') {
# In the case of 1 device in the listentry, push hash into array
push(@devices, $devices_ref);
} else {
# Listentry is an array reference
@devices = @$devices_ref;
}
foreach (@devices) {
# Get disk virtual address and disk type
$type = $_->{'drivers'}->{'listentry'}->{'modules'}->{'module_entry'}->{'listentry'};
$virt_addr = $_->{'sysfs_bus_id'};
@@ -316,6 +321,10 @@ sub provzlinux {
$virt_addr = $virt_addr + 1;
}
}
# Update hosts table and DNS
`makehosts`;
`makedns`;
# Update DHCP
`makedhcp -a`;
@@ -674,6 +683,7 @@ sub clonezlinux {
$out = `chtab node=$node noderes.netboot=zvm nodetype.nodetype=osi nodetype.provmethod=install nodetype.os=$os nodetype.arch=$arch nodetype.profile=$profile nodetype.comments="owner:$owner"`;
# Update hosts table and DNS
sleep(5); # Time needed to update /etc/hosts
`makehosts`;
`makedns`;
+12 -6
View File
@@ -39,7 +39,7 @@ my $krpmver;
my $kerneldir;
my $mode;
my $interactive;
my $onlyinitrd;
#-----------------------------------------------------------------------------
=head3 print_usage - usage message
@@ -51,8 +51,8 @@ sub print_usage
{
print "Usage:\n";
print " genimage\n\n";
print ' genimage -o <osver> [-a <arch>] -p <profile> -i <nodebootif> -n <nodenetdrivers> [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive]'."\n\n";
print ' genimage [-o <osver>] [-a <arch>] [-p <profile>] [-i <nodebootif>] [-n <nodenetdrivers>] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] <imagename>'."\n\n";
print ' genimage -o <osver> [-a <arch>] -p <profile> -i <nodebootif> -n <nodenetdrivers> [--onlyinitrd] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive]'."\n\n";
print ' genimage [-o <osver>] [-a <arch>] [-p <profile>] [-i <nodebootif>] [-n <nodenetdrivers>] [--onlyinitrd] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] <imagename>'."\n\n";
print " --permission is used for statelite only\n";
print " -g is used for SLES only\n\n";
print " -m is used for urbuntu, debian and fedora12 only\n\n";
@@ -60,6 +60,7 @@ sub print_usage
print " genimage\n";
print " genimage --interactive\n";
print " genimage -i eth0 -n tg3 -o sles11 -p compute\n";
print " genimage -i eth0 -n tg3 -o sles11 -p compute --onlyinitrd\n";
print " genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute --interactive\n";
print " genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute\n";
print " genimage -i eth0 -n igb,e1000e,e1000,bnx2,tg3 -o centos5.4 -p nfsroot --permission 777\n";
@@ -82,6 +83,7 @@ if (!GetOptions(
'permission=s' => \$permission,
'kerneldir=s' => \$kerneldir,
'interactive' => \$interactive,
'onlyinitrd' => \$onlyinitrd,
'h|help' => \$help,
'v|version' => \$version,
)) {
@@ -210,7 +212,7 @@ if ((!$imagename) && (!$os)){
chomp($os);
}
print " OS: $os\n";
if ($os) { print " OS: $os\n"; }
@@ -280,7 +282,7 @@ if ((!$imagename) && (!$profile)){
}
}
}
print " Profile: $profile\n";
if ($profile) { print " Profile: $profile\n"; }
# get the interface
if ((!$imagename) && (!$interface)){
@@ -309,7 +311,7 @@ if ((!$imagename) && (!$interface)){
}
}
}
print " Interface: $interface\n";
if ($interface) { print " Interface: $interface\n"; }
@@ -388,6 +390,10 @@ if ($interactive) {
push @arg, "--interactive";
}
if ($onlyinitrd) {
push @arg, "--onlyinitrd";
}
my $cmdref;
push (@{$cmdref->{arg}}, @arg);
$cmdref->{command}->[0] = "genimage";
+184 -2
View File
@@ -20,6 +20,38 @@ B<chhypervisor> I<noderange> [B<-d>]
=back
B<zVM specific :>
=over 2
B<chhypervisor> I<noderange> [B<--adddisk2pool> I<function> I<region> I<volume> I<group>]
B<chhypervisor> I<noderange> [B<--addzfcp2pool> I<pool> I<status> I<wwpn> I<lun> I<size> I<owner>]
B<chhypervisor> I<noderange> [B<--diskpool> I<name>]
B<chhypervisor> I<noderange> [B<--diskpoolnames>]
B<chhypervisor> I<noderange> [B<--fcpchannels> I<state>]
B<chhypervisor> I<noderange> [B<--getnetworknames>]
B<chhypervisor> I<noderange> [B<--getnetwork> I<name>]
B<chhypervisor> I<noderange> [B<--removediskfrompool> I<function> I<region> I<group>]
B<chhypervisor> I<noderange> [B<--removezfcpfrompool> I<pool> I<lun>]
B<chhypervisor> I<noderange> [B<--resetsmapi>]
B<chhypervisor> I<noderange> [B<--smcli> I<function> I<arguments>]
B<chhypervisor> I<noderange> [B<--zfcppoolnames>]
B<chhypervisor> I<noderange> [B<--zfcppool> I<pool> I<space>]
=back
=head1 DESCRIPTION
The B<chhypervisor> command can be used to configure the RHEV-h host.
@@ -31,15 +63,17 @@ After registering, the network interfaces of host need to be added to the 'netwo
RHEV. And the power management for the host should be configured so that
rhev-m could make proper decision when certain host encountered error.
The B<chhypervisor> command can also be used to configure the zVM host.
For each host, an entry should be added to the hypervisor table:
The columns of hypervisor table:
=over 2
B<hypervisor.node> - rhev-h host name.
B<hypervisor.node> - rhev-h host name or zVM host name.
B<hypervisor.type> - Must be set to 'rhevh'.
B<hypervisor.type> - Must be set to 'rhevh' or 'zvm'.
B<hypervisor.mgr> - The rhev manager (The FQDN of rhev-m server) for the host.
@@ -52,6 +86,8 @@ default is 'Default' cluster if not specified.
=head1 OPTIONS
=head2 RHEV specific :
=over 2
=item B<-a>
@@ -113,6 +149,79 @@ Display usage message.
=back
=head2 zVM specific :
=over 2
=item B<--adddisk2pool> I<function> I<region> I<volume> I<group>
Add a disk to a disk pool defined in the EXTENT CONTROL. Function type can be
either: (4) Define region as full volume and add to group OR (5) Add existing
region to group. If the volume already exists in the EXTENT CONTROL, use
function 5. If the volume does not exist in the EXTENT CONTROL, but is attached
to SYSTEM, use function 4.
=item B<--addzfcp2pool> I<pool> I<status> I<wwpn> I<lun> I<size> I<owner>
Add a zFCP device to a device pool defined in xCAT. The device must have been
carved up in the storage controller and configured with a WWPN/LUN before it
can be added to the xCAT storage pool. z/VM does not have the ability to
communicate directly with the storage controller to carve up disks dynamically.
=item B<--diskpool> I<name>
List the configuration for a given disk pool.
=item B<--diskpoolnames>
List the disk pool names available.
=item B<--fcpchannels> I<state>
List the state of real FCP adapter devices.
=item B<--getnetworknames>
List the defined network names available for a given host.
=item B<--getnetwork> I<name>
List the configuration for a given network.
=item B<--removediskfrompool> I<function> I<region> I<group>
Remove a disk from a disk pool defined in the EXTENT CONTROL. Function type can
be either: (1) Remove region, (2) Remove region from group, (3) Remove region
from all groups, OR (7) Remove entire group .
=item B<--removezfcpfrompool> I<pool> I<lun>
Remove a zFCP device from a device pool defined in xCAT.
=item B<--resetsmapi>
Reset z/VM SMAPI, assuming the SMAPI worker machines to reset are: VSMWORK1,
VSMWORK2, VSMWORK3, VSMREQIN, and VSMREQIU.
=item B<--smcli> I<function> I<arguments>
Execute a SMAPI function. A list of APIs supported can be found by using the
help flag, e.g. chhypervisor pokdev61 --smcli -h. Specific arguments associated
with a SMAPI function can be found by using the help flag for the function,
e.g. chhypervisor pokdev61 --smcli Image_Query_DM -h. Only z/VM 5.4 SMAPI
functions are supported at this time. Additional SMAPI functions will be added
in subsequent zHCP versions.
=item B<--zfcppoolnames>
List the zFCP device pool names available.
=item B<--zfcppool> I<pool> I<space>
List the devices in a given zFCP device pool. Space can be either: free or used.
=back
=head1 RETURN VALUE
0 The command completed successfully.
@@ -121,6 +230,8 @@ Display usage message.
=head1 EXAMPLES
=head2 RHEV specific :
=over 2
=item 1.
@@ -150,6 +261,77 @@ To deactivate the host 'host1', enter:
=back
=head2 zVM specific :
=over 2
=item 1.
To add a disk to a disk pool defined in the EXTENT CONTROL, enter:
chhypervisor pokdev61 --adddisk2pool 4 DM1234 DM1234 POOL1
=item 2.
To add a zFCP device to a device pool defined in xCAT, enter:
chhypervisor pokdev61 --addzfcp2pool zfcp1 free 500501234567C890 4012345600000000 8G
=item 3.
To list the free disks in a given disk pool, enter:
chhypervisor pokdev61 --diskpool POOL1 free
=item 4.
To list the disk pool names available, enter:
chhypervisor pokdev61 --diskpoolnames
=item 5.
To list the state of real FCP adapter devices, enter:
chhypervisor pokdev61 --fcpchannels free
=item 6.
To list the configuration for a given network, enter:
chhypervisor pokdev61 --getnetwork GLAN1
=item 7.
To list the defined network names available for a given node, enter:
chhypervisor pokdev61 --getnetworknames
=item 8.
To remove a region from a group in the EXTENT CONTROL, enter:
chhypervisor pokdev61 --removediskfrompool 2 DM1234 POOL1
=item 9.
To remove a zFCP device from a device pool defined in xCAT, enter:
chhypervisor pokdev61 --removezfcpfrompool zfcp1 4012345600000000
=item 10.
To reset z/VM SMAPI, enter:
chhypervisor pokdev61 --resetsmapi
=item 11.
To execute a SMAPI function (Image_Query_DM), enter:
chhypervisor pokdev61 --smcli Image_Query_DM -T LNX3
=item 12.
To list the zFCP device pool names available, enter:
chhypervisor pokdev61 --zfcppoolnames
=item 13.
To list the devices in a given zFCP device pool, enter:
chhypervisor pokdev61 --zfcppool zfcp1
=back
=head1 FILES
/opt/xcat/bin/chhypervisor
+23 -5
View File
@@ -6,9 +6,9 @@ B<genimage> - Generates a stateless image to be used for a diskless install.
B<genimage>
B<genimage> B<-o> I<osver> [B<-a> I<arch>] B<-p> I<profile> B<-i> I<nodebootif> B<-n> I<nodenetdrivers> [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>]
B<genimage> B<-o> I<osver> [B<-a> I<arch>] B<-p> I<profile> B<-i> I<nodebootif> B<-n> I<nodenetdrivers> [B<--onlyinitrd>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>]
B<genimage> [B<-o> I<osver>] [B<-a> I<arch>] [B<-p> I<profile>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>] I<imagename>
B<genimage> [B<-o> I<osver>] [B<-a> I<arch>] [B<-p> I<profile>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<--onlyinitrd>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>] I<imagename>
B<genimage> [B<-h> | B<--help> | B<-v> | B<--version>]
@@ -53,8 +53,10 @@ for statelite: B<liteimg>
Becides prompting for the input for some paramters, the B<genimage> command takes default quesses for the parameters not specified or not defined in the I<osimage> and I<linuximage> tables. It also makes default answers for questions from yum/zypper command when installing rpms into the image. Please use --interactive flag if you want yum/zypper command to prompt you for the answers.
The B<genimage> command must be run on a system that is the same architecture as the nodes it will be
used on. If the management node is not the same architecture, copy the contents of
If B<--onlyinitrd> is specified, only regenerates the initrd for a stateless image to be used for a diskless install.
The B<genimage> command must be run on a system that is the same architecture and same distro with same majar release version as the nodes it will be
used on. If the management node is not the same architecture or same distro level, copy the contents of
/opt/xcat/share/xcat/netboot/<os> to a system that is the proper architecture, and mount /install from
the management node to that system. Then change directory to /opt/xcat/share/xcat/netboot/<os> and run ./genimage.
@@ -104,6 +106,17 @@ which may prove important in some cases.
The maximum size allowed for the root file system in the image. Specify in bytes, or can append k, m, or g.
=item B<--onlyinitrd>
Regenerates the initrd for a stateless image to be used for a diskless install.
Regenerates the initrd that is part of a stateless/statelite image that is used to boot xCAT nodes in a stateless/stateli
te mode.
The generated initrd will be put in /install/netboot/<OS>/<arch>/<profile>.
The B<genimage --onlyinitrd> command will generate two initial ramdisks, one is B<initrd-statelite.gz> for B<statelite> mode, the other one is B<initrd-stateless.gz> for B<stateless> mode.
=item B<--permission> I<permission>
The mount permission of B</.statelite> directory for B<statelite> mode, which is only used for B<statelite> mode, and the default permission is 755.
@@ -193,6 +206,11 @@ x86_64 and place it in the
genimage myimagename --interactive
=item 9
To regenerate the initrd for a fedora8 image for a compute node architecture x86_64 and place it in the /install/netboot/fedora8/x86_64/compute/rootimg directory: change directory to /opt/xcat/share/xcat/netboot/fedora and run:
genimage --onlyinitrd -i eth0 -n tg3,bnx2 -o fedora8 -p compute
=back
@@ -206,4 +224,4 @@ x86_64 and place it in the
=head1 SEE ALSO
L<geninitrd(1)|geninitrd.1>, L<packimage(1)|packimage.1>, L<liteimg(1)|liteimg.1>
L<packimage(1)|packimage.1>, L<liteimg(1)|liteimg.1>
-100
View File
@@ -1,100 +0,0 @@
=head1 NAME
B<geninitrd> - Regenerates the initrd for a stateless image to be used for a diskless install.
=head1 SYNOPSIS
B<geninitrd> [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-o> I<OS>] [B<-p>] [I<profile>] [B<-l> I<rootlimit>] [B<-k> I<kernel_version>] [B<--permission> I<permission>]
B<geninitrd> [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-o> I<OS>] [B<-p>] [I<profile>] [B<-l> I<rootlimit>] [B<-k> I<kernel_version>] [B<--permission> I<permission>] imagename
B<geninitrd> [B<-h> | B<--help> | B<-v> | B<--version>]
=head1 DESCRIPTION
Regenerates the initrd that is part of a stateless/statelite image that is used to boot xCAT nodes in a stateless/statelite mode.
The generated initrd will be put in /install/netboot/<OS>/<arch>/<profile>.
The B<geninitrd> command must be run on a system that is the same architecture as the nodes it will be
used on. If the management node is not the same architecture, copy the contents of
/opt/xcat/share/xcat/netboot/<OS> to a system that is the proper architecture, and mount /install from
the management node to that system.
The B<geninitrd> command will generate two initial ramdisks, one is B<initrd-statelite.gz> for B<statelite> mode, the other one is B<initrd-stateless.gz> for B<stateless> mode.
=head1 OPTIONS
=over 12
=item B<-o> I<OS>
The operating system for the image: fedora8, rhel5, sles10, etc. The OS packages must be in
/install/<OS>/<arch> (use L<copycds(8)|copycds.8>).
=item B<-p> I<profile>
The profile (e.g. compute, service) to use to create the image. This determines what package lists are
used from /opt/xcat/share/xcat/netboot/<OS> to create the image with. When deploying nodes with this image,
the nodes' nodetype.profile attribute must be set to this same value.
=item B<-i> I<nodebootif>
The network interface the diskless node will boot over (e.g. eth0).
=item B<-n> I<nodenetdrivers>
The driver modules needed for the network interface. Note: the order that the drivers are specified in
is important.
=item B<-l> I<rootlimit>
The maximum size allowed for the root file system in the image. Specify in bytes, or can append k, m, or g.
=item B<-k> I<kernel_version>
Use this flag if you want to use a specific version of the kernel in the image. Defaults to the first kernel found
in the install image.
=item B<-v>
Display version.
=item B<-h>
Display usage message.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
=over 3
=item 1.
To regenerate the initrd for a fedora8 image for a compute node architecture x86_64 and place it in the
/install/netboot/fedora8/x86_64/compute/rootimg directory: change directory to
/opt/xcat/share/xcat/netboot/fedora and run:
geninitrd -i eth0 -n tg3,bnx2 -o fedora8 -p compute
=back
=head1 FILES
/opt/xcat/share/xcat/netboot/<OS>/geninitrd
=head1 SEE ALSO
L<genimage(1)|genimage.1>, L<packimage(1)|packimage.1>
+6 -2
View File
@@ -18,7 +18,7 @@ B<getmacs> I<noderange> [B<-V>| B<--verbose>] [B<-f>] [B<-d>] [B<--arp>] | [B<-D
=head2 blade specific:
B<getmacs> I<noderange> [B<-V>| B<--verbose>] [B<-d>] [B<--arp>]
B<getmacs> I<noderange> [B<-V>| B<--verbose>] [B<-d>] [B<--arp>] [B<-i> I<ethN>|I<enN>]
=head1 DESCRIPTION
@@ -32,7 +32,7 @@ Note: If network adapters are physically assigned to LPARs, getmacs cannot read
For IBM Flex Compute Node (Compute Node for short) specific:
Note: If "B<-d>" is specified, all the MAC of the blades will be displayed. Otherwise, the number of MAC address that the 'installnic' attribute of the blade specified will be write to mac table.
Note: If "B<-d>" is specified, all the MAC of the blades will be displayed. If no option specified, the first MAC address of the blade will be written to mac table.
=head1 OPTIONS
@@ -88,6 +88,10 @@ B<-V>
Verbose output.
B<-i>
Specify the interface whose mac address will be collected and written into mac table. If 4 mac addresses are returned by option '-d', they all are the mac addresses of the blade. The N can start from 0(map to the eth0 of the blade) to 3. If 5 mac addresses are returned, the 1st mac address must be the mac address of the blade's FSP, so the N will start from 1(map to the eth0 of the blade) to 4.
=head1 RETURN VALUE
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh
echo $drivers
dracut_install wget openssl tar ipmitool cpio gzip lsmod ethtool modprobe touch echo cut wc
dracut_install wget openssl tar mstflint ipmitool cpio gzip lsmod ethtool modprobe touch echo cut wc
dracut_install netstat # broadcom update requires
dracut_install uniq # mellanox update requires
dracut_install grep ip hostname awk egrep grep dirname expr
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
instmods nfs sunrpc
instmods e1000 e1000e virtio_net igb ines mlx4_en cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb qlge mptsas mpt2sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_si ipmi_devintf
instmods e1000 e1000e virtio_net igb ines sfc mlx4_en cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb qlge mptsas mpt2sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_si ipmi_devintf
instmods macvlan macvtap 8021q bridge bonding vmxnet3 acpi-cpufreq powernow-k8 cdc_ether
instmods mptctl #LSI firmware management requires this
instmods mlx4_ib ib_umad #make the mellanox ib available enough to examine /sys
+30 -8
View File
@@ -16,11 +16,12 @@ use warnings "all";
use Time::HiRes qw/time/;
use IO::Socket::INET qw/!AF_INET6 !PF_INET6/;
my $initialtimeout=0.809;
my $initialtimeout=0.5;
use constant STATE_OPENSESSION=>1;
use constant STATE_EXPECTINGRAKP2=>2;
use constant STATE_EXPECTINGRAKP4=>3;
use constant STATE_ESTABLISHED=>4;
use constant STATE_FAILED=>5;
#my $ipmidbg;
#open($ipmidbg,">","/tmp/ipmidbg");
#sub dprint {
@@ -43,6 +44,7 @@ use IO::Select;
#use Data::Dumper;
use Digest::MD5 qw/md5/;
my $pendingpackets=0;
my %tabooseq;
my $maxpending; #determined dynamically based on rcvbuf detection
my $ipmi2support = eval {
require Digest::SHA1;
@@ -370,6 +372,15 @@ sub checksum {
sub subcmd {
my $self = shift;
my %args = @_;
$self->{expectedcmd}=$args{command};
$self->{expectednetfn}=$args{netfn}+1;
my $seqincrement=7;
while ($tabooseq{$self->{expectednetfn}}->{$self->{expectedcmd}}->{$self->{seqlun}} and $seqincrement) { #avoid using a seqlun formerly marked 'taboo', but don't advance by more than 7, just in case
$tabooseq{$self->{expectednetfn}}->{$self->{expectedcmd}}->{$self->{seqlun}}--; #forgive a taboo lun over time...
$self->{seqlun} += 4; #increment by 1<<2
$self->{seqlun} &= 0xff; #make sure we don't get too large a seqlun
$seqincrement--; #assure seq number doesn't go beyond 7 even if it means going taboo, one enhancement would be to pick the *least* taboo instead of just giving up
}
my $rsaddr=0x20; #figrue 13-4, rssa by old code
my @rnl = ($rsaddr,$args{netfn}<<2);
my @rest = ($self->{rqaddr},$self->{seqlun},$args{command},@{$args{data}});
@@ -450,15 +461,17 @@ sub timedout {
return;
}
$self->{nowait}=1;
$self->{timeout} = $self->{timeout}*1.5;
$self->{timeout} += 1; #$self->{timeout}*2;
if ($self->{noretry}) { return; }
if ($self->{timeout} > 7) { #giveup, really
$self->{timeout}=$initialtimeout;
if ($self->{timeout} > 5) { #giveup, really
$self->{timeout}=$initialtimeout+(0.5*rand());
my $rsp={};
$rsp->{error} = "timeout";
$self->{ipmicallback}->($rsp,$self->{ipmicallback_args});
$self->{nowait}=0;
return;
} elsif ($self->{sessionestablishmentcontext} == STATE_FAILED) {
return;
}
if ($self->{sessionestablishmentcontext} == STATE_OPENSESSION) { #in this particular case, we want to craft a new rmcp session request with a new client side session id, to aid in distinguishing retry from new
$self->open_rmcpplus_request();
@@ -469,6 +482,7 @@ sub timedout {
} elsif ($self->{sessionestablishmentcontext} == STATE_EXPECTINGRAKP4) { #in this particular case, we want to craft a new rmcp session request with a new client side session id, to aid in distinguishing retry from new
$self->relog();
} else {
$self->{hasretried}=1; #remember that we have retried at the moment
$self->sendpayload(%{$self->{pendingargs}},nowait=>1); #do not induce the xmit to wait for packets, just spit it out. timedout is in a wait-for-packets loop already, so it's fine
}
$self->{nowait}=0;
@@ -674,7 +688,7 @@ sub init {
$self->{'sessionid'} = [0,0,0,0]; # init session id
$self->{'authtype'}=0; # first messages will have auth type of 0
$self->{'ipmiversion'}='1.5'; # send first packet as 1.5
$self->{'timeout'}=$initialtimeout; #start at a quick timeout, increase on retry
$self->{'timeout'}=$initialtimeout+(0.5*rand()); #start at a quick timeout, increase on retry
$self->{'seqlun'}=0; #the IPMB seqlun combo, increment by 4s
$self->{rqaddr}=0x81; #Per table '5-4' system sofware ids in the ipmi spec, we are allowed 0x81-0x8d software ids
#A problem with ipmi is that chatty commands (rinv) can mistake stale data for new if sequence number overflows
@@ -786,6 +800,7 @@ sub got_rakp2 {
my @expectedhash = (unpack("C*",hmac_sha1($hmacdata,$self->{password})));
foreach (0..(scalar(@expectedhash)-1)) {
if ($expectedhash[$_] != $data[$_]) {
$self->{sessionestablishmentcontext}=STATE_FAILED;
$self->{onlogon}->("ERROR: Incorrect password provided",$self->{onlogon_args});
return 9;
}
@@ -807,12 +822,19 @@ sub parse_ipmi_payload {
my @payload = @_;
#for now, just trash the headers, this has been validated to death anyway
#except seqlun, that one is important
if ($payload[4] != $self->{seqlun} or $payload[0] != $self->{rqaddr}) {
unless ($payload[4] == $self->{seqlun} and $payload[0] == $self->{rqaddr} and $payload[1]>>2 == $self->{expectednetfn} and $payload[5] == $self->{expectedcmd} ) {
#both sequence number and arqaddr must match, because we are using rqaddr to extend the sequence number
#print "Successfully didn't get confused by stale response ".$payload[4]." and ".($self->{seqlun}-4)."\n";
#hexdump(@payload);
return 1; #response mismatch
}
if ($self->{hasretried}) { #if we sent this out multiple times, mark the sequence as taboo
$self->{hasretried}=0;
$tabooseq{$self->{expectednetfn}}->{$self->{expectedcmd}}->{$self->{seqlun}}=16; #consider a lun taboo for 16 overflow cycles
}
#set to impossible values to reflect the fact we expect *no* command/nnetfn at the moment
$self->{expectednetfn}=0x1ff;
$self->{expectedcmd}=0x1ff;
$self->{seqlun} += 4; #increment by 1<<2
if ($self->{seqlun} > 0xff) { #overflow case
#Problem with rqaddr iteration strategy to get more sequence numbers, changing swid invalidates reservation ids for some BMCs...
@@ -831,7 +853,7 @@ sub parse_ipmi_payload {
$rsp->{cmd} = shift @payload;
$rsp->{code} = shift @payload;
$rsp->{data} = \@payload;
$self->{timeout}=$initialtimeout;
$self->{timeout}=$initialtimeout+(0.5*rand());
$self->{ipmicallback}->($rsp,$self->{ipmicallback_args});
return 0;
}
@@ -947,7 +969,7 @@ sub sendpayload {
$sessions_waiting{$self}->{ipmisession}=$self;
if ($args{delayxmit}) {
$sessions_waiting{$self}->{timeout}=time()+$args{delayxmit};
$self->{timeout}=$initialtimeout/1.5; #since we are burning one of the retry attempts, start the backoff algorithm faster to make it come out even
$self->{timeout}=($initialtimeout+(0.5*rand()))/2; #since we are burning one of the retry attempts, start the backoff algorithm faster to make it come out even
undef $args{delayxmit};
return; #don't actually transmit packet, use retry timer to start us off
} else {
+13 -2
View File
@@ -2000,8 +2000,19 @@ sub preprocess_request {
# build an individual request for each service node
my $service = "xcat";
my @hcps=keys(%hcp_hash);
my $sn = xCAT::Utils->get_ServiceNode(\@hcps, $service, "MN");
my $sn;
my @dfmdispatch = xCAT::Utils->get_site_attribute("hwctrldispatch");
if (defined($dfmdispatch[0]) and ($dfmdispatch[0] =~ /0|n/i)) {
if ($masters[0]) {
push @{$sn->{$masters[0]}}, @hcps;
} else {
$callback->({data=>["The value of the attribute master in the site table is NOT set"]});
$req = {};
return;
}
} else {
$sn = xCAT::Utils->get_ServiceNode(\@hcps, $service, "MN");
}
# build each request for each service node
foreach my $snkey (keys %$sn)
{
+314 -96
View File
@@ -770,15 +770,12 @@ sub nimnodeset
#
# See if we need to create a resolv_conf resource
#
my $RChash;
$RChash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !$RChash ){
my $rsp;
push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
my %resolv_conf_hash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !%resolv_conf_hash ){
# my $rsp;
# push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
# xCAT::MsgUtils->message("E", $rsp, $callback);
}
my %resolv_conf_hash = %{$RChash};
#
# Get a list of all nim resource types
@@ -3459,7 +3456,7 @@ sub mknimimage
#
# get mksysb resource
#
$mksysb_name = &mk_mksysb(\%::attrres, $callback);
$mksysb_name = &mk_mksysb(\%::attrres, $callback, $subreq);
chomp $mksysb_name;
$newres{mksysb} = $mksysb_name;
if (!defined($mksysb_name))
@@ -3595,7 +3592,6 @@ sub mknimimage
}
}
#
# Set root password in diskless images
#
@@ -3619,38 +3615,35 @@ sub mknimimage
$method = $et->{'cryptmethod'};
}
}
}
if ($rootpw) {
if ( $::VERBOSE) {
my $rsp;
$rsp->{data}->[0] = "Setting the root password in the spot \'$spot_name\'\n";
xCAT::MsgUtils->message("I", $rsp, $callback);
}
if ($rootpw) {
if ( $::VERBOSE) {
my $rsp;
$rsp->{data}->[0] = "Setting the root password in the spot \'$spot_name\'\n";
xCAT::MsgUtils->message("I", $rsp, $callback);
chomp $rootpw;
my $pwcmd;
if ($method) {
$pwcmd = qq~$::XCATROOT/bin/xcatchroot -i $spot_name "/usr/bin/echo root:$rootpw | /usr/bin/chpasswd -e -c" >/dev/null 2>&1~;
} else {
$pwcmd = qq~$::XCATROOT/bin/xcatchroot -i $spot_name "/usr/bin/echo root:$rootpw | /usr/bin/chpasswd -c" >/dev/null 2>&1~;
}
}
chomp $rootpw;
my $pwcmd;
if ($method) {
$pwcmd = qq~$::XCATROOT/bin/xcatchroot -i $spot_name "/usr/bin/echo root:$rootpw | /usr/bin/chpasswd -e -c" >/dev/null 2>&1~;
} else {
$pwcmd = qq~$::XCATROOT/bin/xcatchroot -i $spot_name "/usr/bin/echo root:$rootpw | /usr/bin/chpasswd -c" >/dev/null 2>&1~;
}
# secure passwd in verbose mode
my $tmpv = $::VERBOSE;
$::VERBOSE = 0;
# secure passwd in verbose mode
my $tmpv = $::VERBOSE;
$::VERBOSE = 0;
my $out = xCAT::Utils->runcmd("$pwcmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Unable to set root password.";
push @{$rsp->{data}}, "$out\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
my $out = xCAT::Utils->runcmd("$pwcmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Unable to set root password.";
push @{$rsp->{data}}, "$out\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}
$::VERBOSE = $tmpv;
}
$::VERBOSE = $tmpv;
}
#
@@ -4632,7 +4625,7 @@ sub mk_resolv_conf_file
Returns:
- undef
- ptr to hash of resolv_conf resource names
- hash of resolv_conf resource names
=cut
#-----------------------------------------------------------------------------
@@ -5094,7 +5087,7 @@ sub chk_resolv_conf
} # end if $create_res
} # end foreach node
return \%resolv_conf_hash;
return %resolv_conf_hash;
}
#----------------------------------------------------------------------------
@@ -5274,12 +5267,15 @@ sub mk_mksysb
{
my $attrs = shift;
my $callback = shift;
my $sub_req = shift;
my %attrres;
if ($attrs) {
%attrres = %{$attrs};
}
my $snode;
my @validattrs = ("verbose", "nfs_vers", "nfs_sec", "dest_dir", "group", "source", "size_preview", "exclude_files", "mksysb_flags", "mk_image");
my $mksysb_name = $::image_name . "_mksysb";
@@ -5307,10 +5303,46 @@ sub mk_mksysb
{
# create the mksysb definition
my $rsp;
push @{$rsp->{data}}, "Creating a NIM mksysb resource called \'$mksysb_name\'. This could take a while.\n";
xCAT::MsgUtils->message("I", $rsp, $callback);
if ($::MKSYSBNODE)
{
# get the server for the node
my $nrtab = xCAT::Table->new('noderes');
my @nodes;
push @nodes, $::MKSYSBNODE;
my $nrhash;
if ($nrtab)
{
$nrhash = $nrtab->getNodesAttribs(\@nodes, ['servicenode']);
}
my ($remote_server, $junk) = (split /,/, $nrhash->{$::MKSYSBNODE}->[0]->{'servicenode'});
$nrtab->close();
my $nimprime = xCAT::InstUtils->getnimprime();
chomp $nimprime;
if ($remote_server) {
$snode = $remote_server;
} else {
$snode = $nimprime;
}
chomp $snode;
# do we have a seperate service node to handle
my $doSN;
my $nimprimeip = xCAT::NetworkUtils->getipaddr($nimprime);
my $snodeip = xCAT::NetworkUtils->getipaddr($snode);
if ($nimprimeip ne $snodeip) {
$doSN++;
}
# get the location for the new resource
my $loc;
if ($::opt_l)
{
@@ -5321,13 +5353,40 @@ sub mk_mksysb
$loc = "$install_dir/nim/mksysb/$::image_name";
}
# create the nim command
my $location = "$loc/$mksysb_name";
my $nimcmd = "/usr/sbin/nim -Fo define -t mksysb -a server=master ";
# check for relevant cmd line attrs
my %cmdattrs;
if ( ($::NFSv4) && (!$attrres{nfs_vers}) )
{
$cmdattrs{nfs_vers}=4;
}
if (%attrres) {
foreach my $attr (keys %attrres) {
if (grep(/^$attr$/, @validattrs) ) {
$cmdattrs{$attr} = $attrres{$attr};
}
}
}
if (%cmdattrs) {
foreach my $attr (keys %cmdattrs) {
$nimcmd .= "-a $attr=$cmdattrs{$attr} ";
}
}
$nimcmd .= " -a location=$location -a mk_image=yes -a source=$::MKSYSBNODE $mksysb_name 2>&1";
# create resource location for mksysb image
my $cmd = "/usr/bin/mkdir -p $loc";
my $output = xCAT::Utils->runcmd("$cmd", -1);
if ($::RUNCMD_RC != 0)
# create a local dir on nimprime
my $output=xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $nimprime, $cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not create $loc.\n";
push @{$rsp->{data}}, "Could not create $loc on $nimprime.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output\n";
@@ -5336,64 +5395,155 @@ sub mk_mksysb
return undef;
}
# check the file system space needed
# about 1800 MB for a mksysb image???
my $sysbsize = 1800;
if (&chkFSspace($loc, $sysbsize, $callback) != 0)
{
# error
return undef;
}
# if $snode is not nimprime then create dir on snode
if ($doSN) {
$output=xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $snode, $cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not create $loc on $snode.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output\n";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
}
my $rsp;
push @{$rsp->{data}},
"Creating a NIM mksysb resource called \'$mksysb_name\'. This could take a while.\n";
xCAT::MsgUtils->message("I", $rsp, $callback);
# create sys backup from remote node and define res
my $location = "$loc/$mksysb_name";
my $nimcmd = "/usr/sbin/nim -Fo define -t mksysb -a server=master ";
# check for relevant cmd line attrs
my %cmdattrs;
if ( ($::NFSv4) && (!$attrres{nfs_vers}) )
# check if the res is already defined on $snode
# Get a list of all defined resources
$cmd = qq~/usr/sbin/lsnim -c resources | /usr/bin/cut -f1 -d' ' 2>/dev/null~;
my $reslist = xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $snode, $cmd, 0);
if ($::RUNCMD_RC != 0)
{
$cmdattrs{nfs_vers}=4;
my $rsp;
push @{$rsp->{data}}, "Could not get NIM resource definitions on $snode.";
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
my @nimres;
foreach my $res (split(/\n/, $reslist )) {
$res =~ s/$snode:\s+//;
chomp $res;
push @nimres, $res;
}
if (%attrres) {
foreach my $attr (keys %attrres) {
if (grep(/^$attr$/, @validattrs) ) {
$cmdattrs{$attr} = $attrres{$attr};
}
}
if (grep(/^$mksysb_name$/, @nimres))
{
# error if it is
my $rsp;
push @{$rsp->{data}}, "The $mksysb_name resource is already defined on $snode.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
else
{
# otherwise create it
# check the file system space needed
# about 1800 MB for a mksysb image???
# can't really predict how big it could be 1G, 6G ??
# TBD - maybe check size of / on target node???
# if (&chkFS($loc, $sysbsize, $snode, $sub_req, $callback) != 0) {
# # error
# my $rsp;
# push @{$rsp->{data}}, "Insufficient space available for $loc on $snode.\n";
# xCAT::MsgUtils->message("E", $rsp, $callback);
# }
# create the mksysb image of a node - run the command on
# the NIM master for the node
$output=xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $snode, $nimcmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}},
"Could not define mksysb resource named \'$mksysb_name\' on $snode.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output\n";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
}
if (%cmdattrs) {
foreach my $attr (keys %cmdattrs) {
$nimcmd .= "-a $attr=$cmdattrs{$attr} ";
}
}
# if this service node is not the nimprime (management node)
# then copy the mksysb to the nimprime and define it there.
if ($doSN) { # we have a seperate SN
$nimcmd .= " -a location=$location -a mk_image=yes -a source=$::MKSYSBNODE $mksysb_name 2>&1";
$output = xCAT::Utils->runcmd("$nimcmd", -1);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}},
"Could not define mksysb resource named \'$mksysb_name\'.\n";
if ($::VERBOSE)
# check space on nimprime
my $sysbsize = 1800;
# can't really predict how big it could be 1G, 6G ??
# if (&chkFS($loc, $sysbsize, $nimprime, $sub_req, $callback) != 0) {
# # error
# my $rsp;
# push @{$rsp->{data}}, "Insufficient space available for $loc on $nimprime.\n";
# xCAT::MsgUtils->message("E", $rsp, $callback);
# }
# xdsh to SN and xdcp to nimprime
my $dcpcmd = "/opt/xcat/bin/xdcp $snode -P $location $loc";
$output=xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $nimprime, $dcpcmd, 0);
if ($::RUNCMD_RC != 0)
{
push @{$rsp->{data}}, "$output\n";
my $rsp;
push @{$rsp->{data}}, "Could not copy $location from $snode to $nimprime.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output\n";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
# change the file name $mksysb_name._snode -> $mksysb_name
my $newname = "$loc/$mksysb_name";
my $oldname = "$loc/$mksysb_name._$snode";
my $mvcmd = "/bin/mv $oldname $newname 2>&1";
$output=xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $nimprime, $mvcmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not rename $oldname to $newname on $nimprime.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output\n";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
# now define it on the nimprime
my $mkcmd;
if ($::NFSv4)
{
$mkcmd = "/usr/sbin/nim -Fo define -t mksysb -a server=master -a nfs_vers=4 -a location=$location $mksysb_name 2>&1";
}
else
{
$mkcmd = "/usr/sbin/nim -Fo define -t mksysb -a server=master -a location=$location $mksysb_name 2>&1";
}
$output=xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $nimprime, $mkcmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not define mksysb resource named \'$mksysb_name\' on $nimprime.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output\n";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return undef;
}
}
}
elsif ($::SYSB)
{
# we have a mksysb file - so just define the NIM resource
if ($::SYSB !~ /^\//)
{ #relative path
$::SYSB = xCAT::Utils->full_path($::SYSB, $::cwd);
@@ -6592,6 +6742,77 @@ sub chkFSspace
#----------------------------------------------------------------------------
=head3 chkFS
See if there is enough space in file systems. If not try to increase
the size. (Works for remote systems)
Arguments:
Returns:
0 - OK
1 - error
=cut
#-----------------------------------------------------------------------------
sub chkFS
{
my $location = shift;
my $size = shift;
my $target = shift;
my $sub_req = shift;
my $callback = shift;
# get free space
# ex. 1971.06 (Free MB)
my $dfcmd = qq~/usr/bin/df -m $location | /usr/bin/awk '(NR==2){print \$3":"\$7}'~;
my $output = xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $target, $dfcmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not run: \'$dfcmd\' on $target.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
# strip off target name if any
$output =~ s/$target:\s+//;
my ($free_space, $FSname) = split(':', $output);
#
# see if we need to increase the size of the fs
#
my $space_needed;
if ($size >= $free_space)
{
$space_needed = int($size - $free_space);
my $addsize = $space_needed + 100;
my $sizeattr = "-a size=+$addsize" . "M";
my $chcmd = "/usr/sbin/chfs $sizeattr $FSname";
my $output;
$output = xCAT::InstUtils->xcmd($callback, $sub_req, "xdsh", $target, $chcmd, 0);
if ($::RUNCMD_RC != 0)
{
my $rsp;
push @{$rsp->{data}}, "Could not increase file system size for \'$FSname\' on $target. Additonal $addsize MB is needed.\n";
if ($::VERBOSE)
{
push @{$rsp->{data}}, "$output";
}
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
}
return 0;
}
#----------------------------------------------------------------------------
=head3 enoughspace
See if the NIM root resource has enough space to initialize
@@ -10897,14 +11118,12 @@ sub mkdsklsnode
#
# See if we need to create a resolv_conf resource
#
my $RChash;
$RChash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !$RChash ){
my $rsp;
push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
my %resolv_conf_hash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !%resolv_conf_hash ){
# my $rsp;
# push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
# xCAT::MsgUtils->message("E", $rsp, $callback);
}
my %resolv_conf_hash = %{$RChash};
#
# define and initialize the diskless/dataless nodes
@@ -12590,14 +12809,13 @@ sub checkNIMnetworks
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
$ifone =~ s/$target:\s+//;
chomp $ifone;
my $junk1;
my $junk2;
my $adapterhost;
my @ifcontent = split('\n',$ifone);
foreach my $line (@ifcontent) {
$line =~ s/$target:\s+//;
next if ($line =~ /^#/);
($junk1, $junk2, $adapterhost) = split(':', $line);
last;
+4 -1
View File
@@ -607,7 +607,10 @@ sub mknetboot
} elsif ($reshash->{$node}->[0] and $reshash->{$node}->[0]->{primarynic} and $reshash->{$node}->[0]->{primarynic} ne "mac") {
$useifname=1;
$kcmdline .= "ifname=".$reshash->{$node}->[0]->{primarynic}.":";
}
}elsif($osver =~ /^rhels5/ and $arch=~/^ppc/){
#for rhels5-ppc, is we specify installnic="mac",boot device cannot be found during netboot
$useifname=1;
}
#else { #no, we autodetect and don't presume anything
# $kcmdline .="eth0:";
# print "eth0 is used as the default booting network devices...\n";
+41 -4
View File
@@ -43,6 +43,7 @@ use Getopt::Long;
use xCAT::SvrUtils;
use xCAT::FSPUtils;
my $indiscover=0;
my $vitals_info = undef; #used by 'rvitals <node> all' to show lcds info for Firebird blade
sub handled_commands {
return {
@@ -1562,10 +1563,23 @@ sub rscan {
my ($k3,$u3);
$k3->{node} = $name;
my $append;
if ($type eq "ppcblade") {
$u3->{groups} = "blade,all";
$append = "blade";
} else {
$u3->{groups} = $type.",all";
$append = $type;
}
$u3->{groups} = $append.",all";
my $tmp_groups = $db{nodelist}->getNodeAttribs($name,['groups']);
if (defined($tmp_groups) and defined($tmp_groups->{groups})) {
$u3->{groups} = $tmp_groups->{groups};
my @groups_array = split /,/,$tmp_groups->{groups};
if (!grep(/^$append$/, @groups_array)) {
$u3->{groups} .= ",$append";
}
if (!grep(/^all$/, @groups_array)) {
$u3->{groups} .= ",all";
}
}
$db{nodelist}->setAttribs($k3,$u3);
$db{nodelist}{commit} = 1;
@@ -3253,7 +3267,26 @@ sub bladecmd {
} elsif ($command eq "rpower") {
return power(@args);
} elsif ($command eq "rvitals") {
return vitals(@args);
my ($rc, @result) = vitals(@args);
if (defined($vitals_info) and defined($vitals_info->{$currnode})) {
my $attr = $vitals_info->{$currnode};
my $fsp_api = ($::XCATROOT) ? "$::XCATROOT/sbin/fsp-api" : "/opt/xcat/sbin/fsp-api";
my $cmd = "$fsp_api -a query_lcds -T 0 -t 0:$$attr[3]:$$attr[0]:$currnode: 2>&1";
my $res = xCAT::Utils->runcmd($cmd, -1);
if ($res !~ /error/i) {
my @array = split(/\n/, $res);
foreach my $a(@array) {
my ($name, $data) = split(/:/,$a);
if ($data =~ /1\|(\w[\w\s]*)/) {
push @result, "Current LCD: $1";
} else {
push @result, "Current LCD: blank";
}
}
}
}
return ($rc, @result);
#return vitals(@args);
} elsif ($command =~ /r[ms]preset/) {
return resetmp(@args);
} elsif ($command eq "rspconfig") {
@@ -5304,7 +5337,11 @@ sub dompa {
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%newnodestatus, 1);
}
}
if ($command eq "rvitals") {
if ((scalar(@$args) ==1 and $args->[0] eq '') or grep (/all/,@$args)) {
$vitals_info = &get_blades_for_mpa($mpa);
}
}
foreach $node (sort (keys %{$mpahash->{$mpa}->{nodes}})) {
$curn = $node;
+5 -2
View File
@@ -64,6 +64,7 @@ sub process_request {
my $permission; #the permission works only for statelite mode currently
my $krpmver;
my $interactive;
my $onlyinitrd;
my $tempfile;
GetOptions(
@@ -81,6 +82,7 @@ sub process_request {
'kerneldir=s' => \$kerneldir,
'permission=s' => \$permission,
'interactive' => \$interactive,
'onlyinitrd' => \$onlyinitrd,
'tempfile=s' => \$tempfile,
);
@@ -285,8 +287,9 @@ sub process_request {
if ($mode) { $cmd .= " -m $mode";}
if ($permission) { $cmd .= " --permission $permission"; }
if ($kerneldir) { $cmd .= " --kerneldir $kerneldir"; }
if ($interactive) { $cmd .= " --interactive" }
if ($interactive) { $cmd .= " --interactive"; }
if ($onlyinitrd) { $cmd .= " --onlyinitrd"; }
if ($srcdir) { $cmd .= " --srcdir $srcdir";}
if ($pkglist) { $cmd .= " --pkglist $pkglist";}
if ($srcdir_otherpkgs) { $cmd .= " --otherpkgdir $srcdir_otherpkgs"; }
+186 -134
View File
@@ -19,7 +19,7 @@ use xCAT::IPMI;
my %needbladeinv;
use POSIX qw(ceil floor);
use Storable qw(store_fd retrieve_fd thaw freeze);
use Storable qw(nstore_fd retrieve_fd thaw freeze);
use xCAT::Utils;
use xCAT::SvrUtils;
use xCAT::Usage;
@@ -29,7 +29,7 @@ use HTTP::Request::Common;
my $iem_support;
my $vpdhash;
my %allerrornodes=();
my $immdetected=0;
my $global_sessdata;
eval {
require IBM::EnergyManager;
@@ -92,7 +92,7 @@ my $cache_dir = "/var/cache/xcat";
use xCAT::data::ibmleds;
use xCAT::data::ipmigenericevents;
use xCAT::data::ipmisensorevents;
my $cache_version = 3;
my $cache_version = 4;
my %sdr_caches; #store sdr cachecs in memory indexed such that identical nodes do not hit the disk multiple times
#my $status_noop="XXXno-opXXX";
@@ -327,6 +327,7 @@ struct SDR => {
led_id => '$',
fru_type => '$',
fru_subtype => '$',
fru_oem => '$',
};
struct FRU => {
@@ -354,6 +355,7 @@ sub decode_fru_locator { #Handle fru locator records
$sdr->id_string(pack("C*",@locator[17..17+$idlen-1]));
$sdr->fru_type($locator[11]);
$sdr->fru_subtype($locator[12]);
$sdr->fru_oem($locator[15]);
return $sdr;
}
@@ -1491,7 +1493,7 @@ sub inv {
$subcommand = "all";
}
if($subcommand eq "all") {
@types = qw(model serial deviceid mprom guid misc hw asset firmware mac);
@types = qw(model serial deviceid mprom guid misc hw asset firmware mac wwn);
}
elsif($subcommand eq "asset") {
$sessdata->{skipotherfru}=1;
@@ -1568,6 +1570,7 @@ sub add_textual_fru {
my $subcategory = shift;
my $types = shift;
my $sessdata = shift;
my %args = @_;
if ($parsedfru->{$category} and $parsedfru->{$category}->{$subcategory}) {
my $fru;
@@ -1578,10 +1581,16 @@ sub add_textual_fru {
} else {
@subfrus = ($parsedfru->{$category}->{$subcategory})
}
my $index=0;
foreach (@subfrus) {
$index++;
$fru = FRU->new();
$fru->rec_type($types);
if ($args{addnumber}) {
$fru->desc($description." ".$index);
} else {
$fru->desc($description);
}
if (not ref $_) {
$fru->value($_);
} else {
@@ -1608,7 +1617,10 @@ sub add_textual_frus {
add_textual_fru($parsedfru,$desc." ".$categorydesc."Part Number",$category,"partnumber",$type,$sessdata);
add_textual_fru($parsedfru,$desc." ".$categorydesc."Manufacturer",$category,"manufacturer",$type,$sessdata);
add_textual_fru($parsedfru,$desc." ".$categorydesc."Serial Number",$category,"serialnumber",$type,$sessdata);
add_textual_fru($parsedfru,$desc." ".$categorydesc."FRU Number",$category,"frunum",$type,$sessdata);
add_textual_fru($parsedfru,$desc." ".$categorydesc."Version",$category,"version",$type,$sessdata);
add_textual_fru($parsedfru,$desc." ".$categorydesc."MAC Address",$category,"macaddrs","mac",$sessdata,addnumber=>1);
add_textual_fru($parsedfru,$desc." ".$categorydesc."WWN",$category,"wwns","wwn",$sessdata,addnumber=>1);
add_textual_fru($parsedfru,$desc." ".$categorydesc."",$category,"name",$type,$sessdata);
if ($parsedfru->{$category}->{builddate}) {
add_textual_fru($parsedfru,$desc." ".$categorydesc."Manufacture Date",$category,"builddate",$type,$sessdata);
@@ -1686,8 +1698,8 @@ sub got_bmc_fw_info {
$sessdata->{fru_hash}->{mprom} = $fru;
$sessdata->{isanimm}=$isanimm;
if ($isanimm) {
#$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0,0,0,0],callback=>\&get_uefi_version_with_fmapi,callback_args=>$sessdata);
get_imm_property(property=>"/v2/bios/build_id",callback=>\&got_bios_buildid,sessdata=>$sessdata);
#get_imm_property(property=>"/v2/bios/build_id",callback=>\&got_bios_buildid,sessdata=>$sessdata);
check_for_ite(sessdata=>$sessdata);
} else {
initfru_with_mprom($sessdata);
}
@@ -1760,6 +1772,32 @@ sub got_fpga_date {
}
initfru_with_mprom($sessdata);
}
sub check_for_ite {
my %args = @_;
my @getpropertycommand;
my $sessdata = $args{sessdata};
$sessdata->{property_callback} = \&got_ite_check; #$args{callback};
@getpropertycommand = unpack("C*","/v2/cmm/");
my $length = 0b10000000 | (scalar @getpropertycommand);#use length to store tlv
unshift @getpropertycommand,$length;
#command also needs the overall length
$length = (scalar @getpropertycommand);
unshift @getpropertycommand,0; #do not recurse, though it's not going to matter anyway since we are just checking for the existence of the category
unshift @getpropertycommand,$length&0xff;
unshift @getpropertycommand,($length>>8)&0xff;
unshift @getpropertycommand,2; #get all properties command,
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xc4,data=>\@getpropertycommand,callback=>\&got_imm_property,callback_args=>$sessdata);
}
sub got_ite_check {
my %res = @_;
my $sessdata = $res{sessdata};
if ($res{ccode} == 9) { #success, end of tree means an ITE, remember this
$sessdata->{isite}=1;
} else {
$sessdata->{isite}=0;
}
get_imm_property(property=>"/v2/bios/build_id",callback=>\&got_bios_buildid,sessdata=>$sessdata);
}
sub get_imm_property {
my %args = @_;
my @getpropertycommand;
@@ -1774,7 +1812,6 @@ sub get_imm_property {
unshift @getpropertycommand,($length>>8)&0xff;
unshift @getpropertycommand,0; #the actual 'get proprety' command is 0.
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xc4,data=>\@getpropertycommand,callback=>\&got_imm_property,callback_args=>$sessdata);
}
sub got_imm_property {
if (check_rsp_errors(@_)) {
@@ -1786,6 +1823,7 @@ sub got_imm_property {
my $propval = shift @data;
my %res;
$res{sessdata}=$sessdata;
$res{ccode}=$propval;
if ($propval == 0) { #success
shift @data; #discard payload size
shift @data; #discard payload size
@@ -1800,121 +1838,6 @@ sub got_imm_property {
}
$sessdata->{property_callback}->(%res);
}
sub get_uefi_version_with_fmapi {
if (check_rsp_errors(@_)) {
return;
}
my $rsp = shift;
my $sessdata = shift;
my @data = @{$rsp->{data}};
unless ($data[2] == 0 and $data[3] = 3 and $data[4]==0x12 and $data[5]==2) { #we support this major version only
initfru_with_mprom($sessdata);
return;
}
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[1,0,0,5,0x84,0x62,0x69,0x6f,0x73],callback=>\&get_uefi_version_with_xid,callback_args=>$sessdata);
}
sub get_uefi_version_with_xid {
if (check_rsp_errors(@_)) {
return;
}
my $rsp = shift;
my $sessdata = shift;
my @data = @{$rsp->{data}};
if ($data[2] != 0 or $data[3] != 5 or $data[4] != 0x44) {
xCAT::SvrUtils::sendmsg([1,"Error1 retrieving UEFI build version"],$callback,$sessdata->{node},%allerrornodes);
return;
}
splice @data,0,5;
$sessdata->{fmapixid} = \@data;
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[3,0,0,0xa,0x44,@{$sessdata->{fmapixid}},0x84,0x62,0x69,0x6f,0x73],callback=>\&waitfor_openxid,callback_args=>$sessdata);
}
sub waitfor_openxid {
if (check_rsp_errors(@_)) {
return;
}
my $rsp = shift;
my $sessdata = shift;
my @data = @{$rsp->{data}};
if ($data[2] != 0) {
xCAT::SvrUtils::sendmsg([1,"Error2 retrieving UEFI build version"],$callback,$sessdata->{node},%allerrornodes);
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x4,0,0,0x05,0x44,@{$sessdata->{fmapixid}}],callback=>\&fmapi_xid_closed,callback_args=>$sessdata);
return;
}
if ((scalar @data) > 4 and $data[5] == 0x40) { #ready to proceed
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0xa,0,0,0xf,0x44,@{$sessdata->{fmapixid}},0x87,0x62,0x75,0x69,0x6C,0x64,0x69,0x64,0x11,0x52],callback=>\&got_uefi_buildid,callback_args=>$sessdata);
} else {
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x9,0,0,0x5,0x44,@{$sessdata->{fmapixid}}],callback=>\&waitfor_openxid,callback_args=>$sessdata);
}
}
sub got_uefi_buildid {
if (check_rsp_errors(@_)) {
return;
}
my $rsp = shift;
my $sessdata = shift;
my @data = @{$rsp->{data}};
if ($data[2] != 0) {
xCAT::SvrUtils::sendmsg([1,"Error3 retrieving UEFI build version"],$callback,$sessdata->{node},%allerrornodes);
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x4,0,0,0x05,0x44,@{$sessdata->{fmapixid}}],callback=>\&fmapi_xid_closed,callback_args=>$sessdata);
return;
}
my $buildsize = $data[4]&0x7f;
my @buildid = splice @data,5,$buildsize;
$sessdata->{biosbuildid} = pack("C*",@buildid);
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0xa,0,0,0x14,0x44,@{$sessdata->{fmapixid}},0x8c,0x62,0x75,0x69,0x6C,0x64,0x76,0x65,0x72,0x73,0x69,0x6F,0x6E,0x11,0x52],callback=>\&got_uefi_buildversion,callback_args=>$sessdata);
}
sub got_uefi_buildversion {
if (check_rsp_errors(@_)) {
return;
}
my $rsp = shift;
my $sessdata = shift;
my @data = @{$rsp->{data}};
if ($data[2] != 0) {
xCAT::SvrUtils::sendmsg([1,"Error4 retrieving UEFI build version"],$callback,$sessdata->{node},%allerrornodes);
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x4,0,0,0x05,0x44,@{$sessdata->{fmapixid}}],callback=>\&fmapi_xid_closed,callback_args=>$sessdata);
return;
}
my $buildsize = $data[4]&0x7f;
my @buildid = splice @data,5,$buildsize;
$sessdata->{biosbuildversion} = pack("C*",@buildid);
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0xa,0,0,0x11,0x44,@{$sessdata->{fmapixid}},0x89,0x62,0x75,0x69,0x6C,0x64,0x64,0x61,0x74,0x65,0x11,0x52],callback=>\&got_uefi_builddate,callback_args=>$sessdata);
}
sub got_uefi_builddate {
if (check_rsp_errors(@_)) {
return;
}
my $rsp = shift;
my $sessdata = shift;
my @data = @{$rsp->{data}};
if ($data[2] != 0) {
xCAT::SvrUtils::sendmsg([1,"Error5 retrieving UEFI build version"],$callback,$sessdata->{node},%allerrornodes);
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x4,0,0,0x05,0x44,@{$sessdata->{fmapixid}}],callback=>\&fmapi_xid_closed,callback_args=>$sessdata);
return;
}
my $buildsize = $data[4]&0x7f;
my @buildid = splice @data,5,$buildsize;
$sessdata->{biosbuilddate} = pack("C*",@buildid);
my $bver = $sessdata->{biosbuildversion}." (".$sessdata->{biosbuildid}." ".$sessdata->{biosbuilddate}.")";
my $fru = FRU->new();
$fru->rec_type("bios,uefi,firmware");
$fru->desc("UEFI Version");
$fru->value($bver);
$sessdata->{fru_hash}->{uefi} = $fru;
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x4,0,0,0x05,0x44,@{$sessdata->{fmapixid}}],callback=>\&fmapi_xid_closed,callback_args=>$sessdata);
}
sub fmapi_xid_closed {
my $rsp = shift;
my $sessdata=shift;
$sessdata->{ipmisession}->subcmd(netfn=>0x3a,command=>0xf0,data=>[0x2,0,0,0x05,0x44,@{$sessdata->{fmapixid}}],callback=>\&fmapi_xid_destroyed,callback_args=>$sessdata);
}
sub fmapi_xid_destroyed {
my $rsp = shift;
my $sessdata = shift;
initfru_with_mprom($sessdata);
}
sub initfru_withguid {
my $sessdata = shift;
@@ -2136,6 +2059,17 @@ sub initfru_zero {
$sessdata->{fru_hash}->{$frudex++} = $fru;
}
}
if ($fruhash->{board}->{wwns}) {
my $macindex=1;
foreach my $mac (@{$fruhash->{board}->{wwns}}) {
$fru = FRU->new();
$fru->rec_type("wwn");
$fru->desc("WWN $macindex");
$macindex++;
$fru->value($mac);
$sessdata->{fru_hash}->{$frudex++} = $fru;
}
}
if ($fruhash->{board}->{name}->{value}) {
$fru = FRU->new();
$fru->rec_type("misc");
@@ -2447,9 +2381,9 @@ sub add_fruhash {
$fruhash = decode_spd(@{$sessdata->{currfrudata}});
} else {
my $err;
$immdetected=$sessdata->{isanimm}; #pass by global, evil, but practical this time
$global_sessdata=$sessdata; #pass by global, evil, but practical this time
($err,$fruhash) = parsefru($sessdata->{currfrudata});
$immdetected=0; #revert state of global
$global_sessdata=undef; #revert state of global
if ($err) {
my $fru = FRU->new();
if ($sessdata->{currfrutype} and $sessdata->{currfrutype} eq 'dimm') {
@@ -2520,7 +2454,22 @@ sub readcurrfrudevice {
shift @data;
push @{$sessdata->{currfrudata}},@data;
if ($sessdata->{currfrudone}) {
add_fruhash($sessdata);
if ($sessdata->{isite}) {
#IBM OEM command, d0,51,0 further qualifies the command name, we'll first take a stop at block 0, offset 2, one byte, to get VPD version number
#command structured as:
#d0,51,0 = command set identifier
#lsb of offset
#msb of offset
#address type (1 for fru id)
#address (fru id for our use)
#1 - fixed value
#lsb - size
#msb - size
#vpd_base_specivication_ver2.x
$sessdata->{ipmisession}->subcmd(netfn=>0x2e,command=>0x51,data=>[0xd0,0x51,0,0x2,0x0,1,$sessdata->{currfruid},1,1,0],callback=>\&got_vpd_version,callback_args=>$sessdata);
} else {
add_fruhash($sessdata);
}
return;
}
}
@@ -2537,6 +2486,94 @@ sub readcurrfrudevice {
$sessdata->{ipmisession}->subcmd(netfn=>0xa,command=>0x11,data=>[$sessdata->{currfruid},$ls,$ms,$chunk],callback=>\&readcurrfrudevice,callback_args=>$sessdata);
}
sub got_vpd_version {
my $rsp = shift;
my $sessdata = shift;
unless ($rsp and not $rsp->{error} and $rsp->{code} == 0 and $rsp->{data}->[5] == 2) { #unless the query was successful and major vpd version was 2
#short over to adding the fru hash as-is
add_fruhash($sessdata);
return;
}
#making it this far, we have affirmative confirmation of ibm oem vpd data, time to chase component mac, wwpn, and maybe mezz firmware
#will need:
# block 0, offset 0c8h use the offset to add to block 1 offsets (usually 400h), denoting as $blone
# block 1, $blone+6 - 216 bytes: 6 sets of 36 byte version information (TODO)
# block 1, $blone+0x1d0: port type first 4 bits protocol, last 3 bits addressing
# block 1, $blone+0x240: 64 bytes, up to 8 sets of addresses, mac is left aligned
# block 1, $blone+0x300: if mac+wwn, grab wwn
$sessdata->{ipmisession}->subcmd(netfn=>0x2e,command=>0x51,data=>[0xd0,0x51,0,0xc8,0x0,1,$sessdata->{currfruid},1,2,0],callback=>\&got_vpd_block1,callback_args=>$sessdata);
}
sub got_vpd_block1 {
my $rsp = shift;
my $sessdata = shift;
unless ($rsp and not $rsp->{error} and $rsp->{code} == 0) { # if this should go wonky, jump ahead
add_fruhash($sessdata);
return;
}
$sessdata->{vpdblock1offset}=$rsp->{data}->[5]<<8+$rsp->{data}->[6];
my $ptoffset = $sessdata->{vpdblock1offset} + 0x1d0;
$sessdata->{ipmisession}->subcmd(netfn=>0x2e,command=>0x51,data=>[0xd0,0x51,0,$ptoffset&0xff,$ptoffset>>8,1,$sessdata->{currfruid},1,1,0],callback=>\&got_portaddr_type,callback_args=>$sessdata);
}
sub got_portaddr_type {
my $rsp = shift;
my $sessdata = shift;
unless ($rsp and not $rsp->{error} and $rsp->{code} == 0) { # if this should go wonky, jump ahead
add_fruhash($sessdata);
return;
}
my $addrtype = $rsp->{data}->[5] & 0b111;
if ($addrtype == 0b101) {
$sessdata->{needmultiaddr}=1;
$sessdata->{curraddrtype}="mac";
} elsif ($addrtype == 0b1) {
$sessdata->{curraddrtype}="mac";
} elsif ($addrtype == 0b10) {
$sessdata->{curraddrtype}="wwn";
} else { #for now, skip polling addresses I haven't examined directly
add_fruhash($sessdata);
return;
}
my $addroffset = $sessdata->{vpdblock1offset} + 0x240;
$sessdata->{ipmisession}->subcmd(netfn=>0x2e,command=>0x51,data=>[0xd0,0x51,0,$addroffset&0xff,$addroffset>>8,1,$sessdata->{currfruid},1,64,0],callback=>\&got_vpd_addresses,callback_args=>$sessdata);
}
sub got_vpd_addresses {
my $rsp = shift;
my $sessdata = shift;
unless ($rsp and not $rsp->{error} and $rsp->{code} == 0) { # if this should go wonky, jump ahead
add_fruhash($sessdata);
return;
}
my @addrdata = @{$rsp->{data}};
splice @addrdata,0,5; # remove the header info
my $macstring = "1";
while ($macstring !~ /^00:00:00:00:00:00/) {
my @currmac = splice @addrdata,0,8;
unless ((scalar @currmac) == 8) {
last;
}
$macstring = sprintf("%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",@currmac);
if ($macstring =~ /^00:00:00:00:00:00:00:00/) {
last;
}
if ($sessdata->{curraddrtype} eq "mac") {
$macstring =~ s/:..:..$//;
push @{$sessdata->{currmacs}},$macstring;
} elsif ($sessdata->{curraddrtype} eq "wwn") {
push @{$sessdata->{currwwns}},$macstring;
}
}
if ($sessdata->{needmultiaddr}) {
$sessdata->{needmultiaddr}=0;
$sessdata->{curraddrtype}="wwn";
my $addroffset = $sessdata->{vpdblock1offset} + 0x300;
$sessdata->{ipmisession}->subcmd(netfn=>0x2e,command=>0x51,data=>[0xd0,0x51,0,$addroffset&0xff,$addroffset>>8,1,$sessdata->{currfruid},1,64,0],callback=>\&got_vpd_addresses,callback_args=>$sessdata);
return;
}
add_fruhash($sessdata);
}
sub parsefru {
my $bytes = shift;
my $fruhash;
@@ -2590,6 +2627,15 @@ sub parsefru {
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)];
$fruhash->{board} = parseboard(@currarea);
}
if (ref $global_sessdata->{currmacs}) {
$fruhash->{board}->{macaddrs}=[];
push @{$fruhash->{board}->{macaddrs}},@{$global_sessdata->{currmacs}};
delete $global_sessdata->{currmacs}; # consume the accumulated mac addresses to avoid afflicting subsequent fru
}
if (ref $global_sessdata->{currwwns}) {
push @{$fruhash->{board}->{wwns}},@{$global_sessdata->{currwwns}};
delete $global_sessdata->{currwwns}; # consume wwns
}
if ($bytes->[4]) { #Product info area present, will probably be thoroughly modified
$curridx=$bytes->[4]*8;
unless ($bytes->[$curridx]==1) {
@@ -2772,13 +2818,13 @@ sub parseboard {
$idx+=$currsize;
($currsize,$currdata,$encode)=extractfield(\@area,$idx);
}
if ($immdetected) { #we can understand more specifically some of the extra fields...
if ($global_sessdata->{isanimm}) { #we can understand more specifically some of the extra fields...
$boardinf{frunum}=$boardinf{extra}->[0]->{value};
$boardinf{revision}=$boardinf{extra}->[4]->{value};
#time to process the mac field...
my $macdata = $boardinf{extra}->[6]->{value};
my $macstring = "1";
while ($macstring !~ /00:00:00:00:00:00/) {
while ($macstring !~ /00:00:00:00:00:00/ and not ref $global_sessdata->{currmacs}) {
my @currmac = splice @$macdata,0,6;
unless ((scalar @currmac) == 6) {
last;
@@ -2789,7 +2835,7 @@ sub parseboard {
}
}
delete $boardinf{extra};
}
}
return \%boardinf;
}
sub parsechassis {
@@ -4988,17 +5034,17 @@ sub initsdr_withrepinfo {
my $fw_rev2=$sessdata->{firmware_rev2};
#TODO: beware of dynamic SDR contents
my $cache_file = "$cache_dir/sdr_$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2.$cache_version";
my $cache_file = "$cache_dir/sdr_$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2";
$sessdata->{sdrcache_file} = $cache_file;
if($enable_cache eq "yes") {
if ($sdr_caches{"$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2.$cache_version"}) {
$sessdata->{sdr_hash} = $sdr_caches{"$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2.$cache_version"};
if ($sdr_caches{"$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2"}) {
$sessdata->{sdr_hash} = $sdr_caches{"$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2"};
on_bmc_connect("SUCCESS",$sessdata); #retry bmc_connect since sdr_cache is validated
return; #don't proceed to slow load
} else {
my $rc = loadsdrcache($sessdata,$cache_file);
if($rc == 0) {
$sdr_caches{"$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2.$cache_version"} = $sessdata->{sdr_hash};
$sdr_caches{"$mfg_id.$prod_id.$device_id.$dev_rev.$fw_rev1.$fw_rev2"} = $sessdata->{sdr_hash};
on_bmc_connect("SUCCESS",$sessdata); #retry bmc_connect since sdr_cache is validated
return; #don't proceed to slow load
}
@@ -5092,7 +5138,7 @@ sub start_sdr_record {
return;
}
$sessdata->{sdr_data} = [0,0,0,$sdr_ver,$sdr_type,$sessdata->{curr_sdr_len}];
$sessdata->{sdr_data} = [0,0,0,$sdr_ver,$sdr_type,$sessdata->{curr_sdr_len}]; #seems that an extra zero is prepended to allow other code to do 1 based counting out of laziness to match our index to the spec indicated index
$sessdata->{sdr_offset} = 5;
my $offset=5; #why duplicate? to make for shorter typing
my $numbytes = 22;
@@ -5656,9 +5702,12 @@ sub storsdrcache {
flock($fh,LOCK_EX) || return(1);
my $hdr;
$hdr->{xcat_sdrcacheversion} = $cache_version;
nstore_fd($hdr,$fh);
foreach $key (keys %{$sessdata->{sdr_hash}}) {
my $r = $sessdata->{sdr_hash}->{$key};
store_fd($r,$fh);
nstore_fd($r,$fh);
}
close($fh);
@@ -5676,6 +5725,9 @@ sub loadsdrcache {
if(!open($fh,"<$file")) {
return(1);
}
$r = retrieve_fd($fh);
unless ($r) { close($fh); return 1; }
unless ($r->{xcat_sdrcacheversion} and $r->{xcat_sdrcacheversion} == $cache_version) { close($fh); return 1; } #version mismatch
flock($fh,LOCK_SH) || return(1);
+100 -97
View File
@@ -21,7 +21,6 @@
# role, for access permission
# domain, for user/group management
#TODO: handle the functions base on the version
#TODO: handle the datacenter and cluster management
#TODO: add the support of iscsi storage domain
@@ -904,6 +903,7 @@ my $display = {
'stateless' => ["stateless"],
'placement_policy' => ["placement_policy/affinity"],
'memory_guaranteed' => ["memory_policy/guaranteed"],
'host' => ["host", "id", "hosts", "/host/name"],
},
'templates' => {
'memory' => ["memory"],
@@ -1996,7 +1996,7 @@ sub mkvm {
if ($myvment->{cpus}) {
my ($socketnum, $corenum) = split(':', $myvment->{cpus});
unless ($corenum) {$corenum = 1;}
$cpuele = "<cpu><topology cores=\"$socketnum\" sockets=\"$corenum\"/></cpu>";
$cpuele = "<cpu><topology cores=\"$corenum\" sockets=\"$socketnum\"/></cpu>";
} elsif (!$hastpl) {
$cpuele = "<cpu><topology cores=\"1\" sockets=\"1\"/></cpu>"
}
@@ -2089,92 +2089,96 @@ sub mkvm {
}
#Add the disk for the vm from storage domain
#Get the storage domain by name
my ($sdname, $disksize, $disktype) = split(':', $myvment->{storage});
if ($sdname) {
if (waitforcomplete($ref_rhevm, "/api/vms/$vmid", "/vm/status/state=down", 30)) {
my $rsp;
push @{$rsp->{data}}, "$node: failed to waiting the vm gets to \"down\" state.";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
$success = 0;
my $sdid;
($rc, $sdid, $stat) = search_src($ref_rhevm, "storagedomains", $sdname);
if ($rc) {
my $rsp;
push @{$rsp->{data}}, "Could not get the storage domain $sdname.";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
if ($sdid) {
$api = "/api/vms/$vmid/disks";
$method = "POST";
# generate the content
if ($disktype) {
$disktype_t->setData($disktype);
if ($disktype eq "system") {
$diskboot_t->setData("true");
} else {
$diskboot_t->setData("false");
}
} else {
$disktype_t->setData("system");
$diskboot_t->setData("true");
}
# set the size of disk
if ($disksize) {
$disksize =~ s/g/000000000/i;
$disksize =~ s/m/000000/i;
} else {
$disksize = "5000000000"; #5G is default
}
$sdid_ele->setAttribute("id", $sdid);
$sdsize_t->setData($disksize);
# set the interface type and format for disk
if ($myvment->{storagemodel}) {
my ($iftype,$iffmt) = split(':', $myvment->{storagemodel});
$sdif_t->setData($iftype);
$sdfm_t->setData($iffmt);
} else {
$sdif_t->setData("virtio");
$sdfm_t->setData("cow");
}
$request = genreq($ref_rhevm, $method, $api, $adds->toString());
($rc, $response) = send_req($ref_rhevm, $request->as_string());
if (!$rc) {
my $parser = XML::LibXML->new();
my $doc = $parser->parse_string($response);
if (defined($doc->findnodes("/fault")->[0])) {
my $rsp;
push @{$rsp->{data}}, "$node: Add disk failed for virtual machine";
if ($doc->findnodes("/fault/detail")->[0]) {
push @{$rsp->{data}}, $doc->findnodes("/fault/detail")->[0]->textContent();
}
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
my $state;
if (defined($doc->findnodes("/disk/creation_status/state")->[0])) {
$state = $doc->findnodes("/disk/creation_status/state")->[0]->textContent();
}
if ($state =~ /fail/i) {
my $rsp;
push @{$rsp->{data}}, "$node: Add disk failed for virtual machine";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
$success = 1;
} else {
my @disklist = split ('\|', $myvment->{storage});
foreach (@disklist) {
my ($sdname, $disksize, $disktype) = split(':', $_);
if ($sdname) {
if (waitforcomplete($ref_rhevm, "/api/vms/$vmid", "/vm/status/state=down", 30)) {
my $rsp;
push @{$rsp->{data}}, $response;
push @{$rsp->{data}}, "$node: failed to waiting the vm gets to \"down\" state.";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
$success = 0;
#Get the storage domain by name
my $sdid;
($rc, $sdid, $stat) = search_src($ref_rhevm, "storagedomains", $sdname);
if ($rc) {
my $rsp;
push @{$rsp->{data}}, "Could not get the storage domain $sdname.";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
if ($sdid) {
$api = "/api/vms/$vmid/disks";
$method = "POST";
# generate the content
if ($disktype) {
$disktype_t->setData($disktype);
if ($disktype eq "system") {
$diskboot_t->setData("true");
} else {
$diskboot_t->setData("false");
}
} else {
$disktype_t->setData("system");
$diskboot_t->setData("true");
}
# set the size of disk
if ($disksize) {
$disksize =~ s/g/000000000/i;
$disksize =~ s/m/000000/i;
} else {
$disksize = "5000000000"; #5G is default
}
$sdid_ele->setAttribute("id", $sdid);
$sdsize_t->setData($disksize);
# set the interface type and format for disk
if ($myvment->{storagemodel}) {
my ($iftype,$iffmt) = split(':', $myvment->{storagemodel});
$sdif_t->setData($iftype);
$sdfm_t->setData($iffmt);
} else {
$sdif_t->setData("virtio");
$sdfm_t->setData("cow");
}
$request = genreq($ref_rhevm, $method, $api, $adds->toString());
($rc, $response) = send_req($ref_rhevm, $request->as_string());
if (!$rc) {
my $parser = XML::LibXML->new();
my $doc = $parser->parse_string($response);
if (defined($doc->findnodes("/fault")->[0])) {
my $rsp;
push @{$rsp->{data}}, "$node: Add disk failed for virtual machine";
if ($doc->findnodes("/fault/detail")->[0]) {
push @{$rsp->{data}}, $doc->findnodes("/fault/detail")->[0]->textContent();
}
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
my $state;
if (defined($doc->findnodes("/disk/creation_status/state")->[0])) {
$state = $doc->findnodes("/disk/creation_status/state")->[0]->textContent();
}
if ($state =~ /fail/i) {
my $rsp;
push @{$rsp->{data}}, "$node: Add disk failed for virtual machine";
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
$success = 1;
} else {
my $rsp;
push @{$rsp->{data}}, $response;
xCAT::MsgUtils->message("E", $rsp, $callback);
next;
}
}
}
}
@@ -2485,7 +2489,7 @@ sub chvm {
if ($myvment->{cpus}) {
my ($socketnum, $corenum) = split(':', $myvment->{cpus});
unless ($corenum) {$corenum = 1;}
$cpuele = "<cpu><topology cores=\"$socketnum\" sockets=\"$corenum\"/></cpu>";
$cpuele = "<cpu><topology cores=\"$corenum\" sockets=\"$socketnum\"/></cpu>";
}
# configure bootorder
@@ -2806,7 +2810,7 @@ sub rmigrate {
my $api = "/api/vms/$vmid/migrate";
my $method = "POST";
my $content = "<action><host id=\"$hostid\"/></action>";
my $content = "<action><host id=\"$hostid\"/><force>true</force></action>";
my $request = genreq($ref_rhevm, $method, $api, $content);
my $response;
($rc, $response) = send_req($ref_rhevm, $request->as_string());
@@ -3044,7 +3048,11 @@ sub search_src {
if ($type eq "vms") {
$idstr = "/vms/vm";
} elsif ($type eq "hosts") {
$idstr = "/hosts/host";
if ($individual) {
$idstr = "/host";
} else {
$idstr = "/hosts/host";
}
} elsif ($type eq "templates") {
$idstr = "/templates/template";
} elsif ($type eq "storagedomains") {
@@ -3839,12 +3847,7 @@ sub getrvidparms {
$consparam{method} = 'kvm';
# get the attributes for vm
my $api = "/api/vms?search=$node";
my $method = "GET";
my $content = "";
my $request = genreq($ref_rhevm, $method, $api, $content);
my ($rc, $response) = send_req($ref_rhevm, $request->as_string());
my ($rc, undef, undef, $response) = search_src($ref_rhevm, "vms", "$node");
my $vmid;
my $rsp;
@@ -3875,11 +3878,11 @@ sub getrvidparms {
}
# get the password ticket for the external program to accesss the VNC
$api = "/api/vms/$vmid/ticket";
$method = "POST";
$content = "<action><ticket><expiry>120</expiry></ticket></action>";
my $api = "/api/vms/$vmid/ticket";
my $method = "POST";
my $content = "<action><ticket><expiry>120</expiry></ticket></action>";
$request = genreq($ref_rhevm, $method, $api, $content);
my $request = genreq($ref_rhevm, $method, $api, $content);
($rc, $response) = send_req($ref_rhevm, $request->as_string());
if ($rc) {
+1 -1
View File
@@ -1056,7 +1056,7 @@ sub copycd
close($content);
foreach (@contents) {
if (/^VERSION/) {
my @verpair = split;
my @verpair = split /\s+|-/;
$detdistname = "sles".$verpair[1];
unless ($distname) { $distname = $detdistname; }
}
+13 -2
View File
@@ -84,7 +84,11 @@ sub process_request {
$callback = shift;
$docmd = shift;
%searchmacs=();
my $srvtypes = [ qw/service:management-hardware.IBM:chassis-management-module service:management-hardware.IBM:management-module service:management-hardware.IBM:integrated-management-module2/ ];
my $srvtypes = [ qw/service:management-hardware.IBM:chassis-management-module/ ];
xCAT::SLP::dodiscover(SrvTypes=>$srvtypes,Callback=>\&handle_new_slp_entity);
$srvtypes = [ qw/service:management-hardware.IBM:management-module/ ];
xCAT::SLP::dodiscover(SrvTypes=>$srvtypes,Callback=>\&handle_new_slp_entity);
$srvtypes = [ qw/service:management-hardware.IBM:integrated-management-module2/ ];
xCAT::SLP::dodiscover(SrvTypes=>$srvtypes,Callback=>\&handle_new_slp_entity);
my $mpatab=xCAT::Table->new("mpa",-create=>0);
@@ -346,7 +350,14 @@ sub do_blade_setup {
sendmsg([1,"Failed to set up Management module due to Incorrect Password (You may try the environment variables XCAT_CURRENTUSER and/or XCAT_CURRENTPASS to try a different value)"],$callback,$nodename);
return 0;
}
sendmsg([$result->[0],$result->[2]],$callback,$nodename);
my $errors = $result->[2];
if (ref $errors) {
foreach my $error (@$errors) {
sendmsg([$result->[0],$error],$callback,$nodename);
}
} else {
sendmsg([$result->[0],$result->[2]],$callback,$nodename);
}
return 0;
}
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1036,7 +1036,7 @@ sub initDB
$chtabcmds .=
"$::XCATROOT/sbin/chtab key=xcatconfdir site.value=$confdir;";
$chtabcmds .=
"$::XCATROOT/sbin/chtab key=timezone site.value=$timezone;";
"$::XCATROOT/sbin/chtab key=timezone site.value=\"$timezone\";";
$chtabcmds .= "$::XCATROOT/sbin/chtab key=useNmapfromMN site.value=no;";
$chtabcmds .= "$::XCATROOT/sbin/chtab key=enableASMI site.value=no;";
+15 -15
View File
@@ -227,7 +227,7 @@ my $socket;
my $retry=1;
$SIG{USR2} = sub {
if ($socket) { #do not mess with pid file except when we still have the socket.
unlink("/tmp/xcat/installservice.pid"); close($socket); $quit=1;
unlink("/var/run/xcat/installservice.pid"); close($socket); $quit=1;
xCAT::MsgUtils->message("S","xcatd install monitor $$ quiescing");
}
};
@@ -242,7 +242,7 @@ my $socket;
ReuseAddr => 1,
Listen => 8192);
}
if (not $socket and open($installpidfile,"<","/tmp/xcat/installservice.pid")) { #if we couldn't get the socket, go to pid to figure out current owner
if (not $socket and open($installpidfile,"<","/var/run/xcat/installservice.pid")) { #if we couldn't get the socket, go to pid to figure out current owner
#TODO: lsof or similar may be a more accurate measure
my $pid = <$installpidfile>;
if ($pid) {
@@ -273,7 +273,7 @@ sleep 0.05; #up to 50 ms outage possible
die;
}
#we have the socket, now we claim the pid file as our own
open($installpidfile,">","/tmp/xcat/installservice.pid"); #if here, everyone else has unlinked installservicepid or doesn't care
open($installpidfile,">","/var/run/xcat/installservice.pid"); #if here, everyone else has unlinked installservicepid or doesn't care
print $installpidfile $$;
close($installpidfile);
until ($quit) {
@@ -432,10 +432,10 @@ if ($inet6support) {
}
}
}
if (open($installpidfile,"<","/tmp/xcat/installservice.pid")) {
if (open($installpidfile,"<","/var/run/xcat/installservice.pid")) {
my $pid = <$installpidfile>;
if ($pid == $$) { #if our pid, unlink the file, otherwise, we managed to see the pid after someone else created it
unlink("/tmp/xcat/installservice.pid");
unlink("/var/run/xcat/installservice.pid");
}
close($installpidfile);
}
@@ -457,7 +457,7 @@ sub do_udp_service { #This function opens up a UDP port
$SIG{USR2} = sub {
if ($socket) {
#only clear out pid file when we still have socket.
unlink("/tmp/xcat/udpservice.pid"); close($socket); $quit=1; $socket=0;
unlink("/var/run/xcat/udpservice.pid"); close($socket); $quit=1; $socket=0;
xCAT::MsgUtils->message("S","xcatd udp service $$ quiescing");
}
};
@@ -470,7 +470,7 @@ sub do_udp_service { #This function opens up a UDP port
Proto => 'udp',
Domain => AF_INET);
}
if (not $socket and open($udppidfile,"<","/tmp/xcat/udpservice.pid")) {
if (not $socket and open($udppidfile,"<","/var/run/xcat/udpservice.pid")) {
my $pid = <$udppidfile>;
if ($pid) {
$retry=100; #grace period for old instance to get out of the way, 5 seconds
@@ -500,7 +500,7 @@ sleep 0.05;
die "Unable to start UDP on $port";
}
#only take udp pid if we get the socket
open($udppidfile,">","/tmp/xcat/udpservice.pid"); #if here, everyone else has unlinked udpservicepid or doesn't care
open($udppidfile,">","/var/run/xcat/udpservice.pid"); #if here, everyone else has unlinked udpservicepid or doesn't care
print $udppidfile $$;
close($udppidfile);
$select->add($socket);
@@ -574,10 +574,10 @@ sleep 0.05;
exit 1;
}
}
if (open($udppidfile,"<","/tmp/xcat/udpservice.pid")) {
if (open($udppidfile,"<","/var/run/xcat/udpservice.pid")) {
my $pid = <$udppidfile>;
if ($pid == $$) { #if our pid, unlink the file, otherwise, we managed to see the pid after someone else created it
unlink("/tmp/xcat/udpservice.pid");
unlink("/var/run/xcat/udpservice.pid");
}
close($udppidfile);
}
@@ -794,7 +794,7 @@ my $listener;
my $mainpidfile;
$SIG{USR2} = sub {
if ($listener) {
unlink("/tmp/xcat/mainservice.pid"); close($listener); $quit=1; $listener=0;
unlink("/var/run/xcat/mainservice.pid"); close($listener); $quit=1; $listener=0;
xCAT::MsgUtils->message("S","xcatd main service $$ quiescing");
}
};
@@ -811,7 +811,7 @@ $SIG{USR2} = sub {
Reuse => 1,
);
}
if (not $listener and open($mainpidfile,"<","/tmp/xcat/mainservice.pid")) {
if (not $listener and open($mainpidfile,"<","/var/run/xcat/mainservice.pid")) {
my $pid = <$mainpidfile>;
if ($pid) {
$retry=100; #grace period for old instance to get out of the way, 5 seconds
@@ -851,7 +851,7 @@ unless ($listener) {
die "ERROR:Unable to start xCAT service on port $port.";
}
#only write to pid file if we have listener, listener ownership serves as lock to protect integrity
open($mainpidfile,">","/tmp/xcat/mainservice.pid"); #if here, everyone else has unlinked mainservicepid or doesn't care
open($mainpidfile,">","/var/run/xcat/mainservice.pid"); #if here, everyone else has unlinked mainservicepid or doesn't care
print $mainpidfile $$;
close($mainpidfile);
closelog();
@@ -954,10 +954,10 @@ if ($inet6support) {
$sslclients++; #THROTTLE
$cnnection->close();
}
if (open($mainpidfile,"<","/tmp/xcat/mainservice.pid")) {
if (open($mainpidfile,"<","/var/run/xcat/mainservice.pid")) {
my $pid = <$mainpidfile>;
if ($pid == $$) { #if our pid, unlink the file, otherwise, we managed to see the pid after someone else created it
unlink("/tmp/xcat/mainservice.pid");
unlink("/var/run/xcat/mainservice.pid");
}
close($mainpidfile);
}
@@ -0,0 +1,7 @@
@base
@core
@base-x
fipscheck
device-mapper-multipath
sgpio
apr
@@ -0,0 +1,32 @@
# Kickstart file
install
url --url replace_url
key --skip
lang en_US.UTF-8
network --bootproto dhcp
rootpw replace_rootpw
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda --append=" crashkernel=auto"
reboot
key --skip
# Define zFCP channel devices
# The order determines the drive name, such as sda, sdb, etc.
replace_root_device
# Removes partitions from the devices
clearpart --all --drives=sda
# Create root partition and swap space
part / --fstype=ext3 --size=100 --grow --ondisk=sda
part swap --recommended --ondisk=sda
# Install software packages
%packages
replace_software_packages
%post
@@ -0,0 +1,3 @@
@base
@core
apr
@@ -0,0 +1,32 @@
# Kickstart file
install
url --url replace_url
key --skip
lang en_US.UTF-8
network --bootproto dhcp
rootpw replace_rootpw
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda --append=" crashkernel=auto"
reboot
key --skip
# Define zFCP channel devices
# The order determines the drive name, such as sda, sdb, etc.
replace_root_device
# Removes partitions from the devices
clearpart --all --drives=sda
# Create root partition and swap space
part / --fstype=ext3 --size=100 --grow --ondisk=sda
part swap --recommended --ondisk=sda
# Install software packages
%packages
replace_software_packages
%post
+52 -4
View File
@@ -9,6 +9,10 @@ do
done
chmod 644 /dev/vcs*
chown root /dev/vcs*
if [ -r /tmp/updates/etc/pki/tls/certs/ca-bundle.crt ]; then
cp -f /tmp/updates/etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/
fi
cat >/tmp/foo.py <<EOF
#!/usr/bin/python
@@ -122,6 +126,49 @@ chmod 755 /tmp/foo.py
/tmp/foo.py >/foo.log 2>&1 &
#time to ascertain fstype and PReP/UEFI/legacy
#also, find first available block device (sda or vda likely)
#TODO: pick a likely non-SAN target if possible
shopt -s nullglob
for disk in /dev/vd*[^0-9];do
if [ -z "$firstdirectdisk" ]; then firstdirectdisk=$disk; fi #remember first disk as a guess of medium resort
eddname=$(/lib/udev/edd_id $disk 2> /dev/null)
if [ ! -z "$eddname" -a "$eddname" = "int13_dev80" ]; then
instdisk=$disk
break
fi
done
if [ -z "$instdisk" ]; then
for disk in /dev/sd*[^0-9]; do
eddname=$(/lib/udev/edd_id $disk 2> /dev/null)
if [ ! -z "$eddname" -a "$eddname" = "int13_dev80" ]; then
instdisk=$disk
break
fi
currdriver=`udevadm info --attribute-walk --name $disk |grep DRIVERS|grep -v '""'|grep -v '"sd"'|head -n 1|sed -e 's/[^"]*"//' -e 's/"//'`
case "$currdriver" in
"ata_piix4"|"PMC MaxRAID"|"ahci"|"megaraid_sas") #certainly direct
if [ -z "$firstdirectdisk" ]; then firstdirectdisk=$disk; fi #remember first disk as a guess of medium resort
;;
"mptsas"|"mpt2sas") #*PROBABLY* not SAN, but SAS SAN is possible
if [ -z "$probablyfirstdirectdisk" ]; then probablyfirstdirectdisk=$disk; fi #remember first disk as a guess of medium resort
;;
*)
if [ -z "$firstdisk" ]; then firstdisk=$disk; fi #remember first disk as a guess of medium resort
;;
esac
done
fi
if [ -z "$instdisk" ]; then
if [ ! -z "$firstdirectdisk" ]; then
instdisk=$firstdirectdisk
elif [ ! -z "$probablyfirstdirectdisk" ]; then
instdisk=$probablyfirstdirectdisk
elif [ ! -z "$firstdisk" ]; then
instdisk=$firstdisk
fi
fi
modprobe ext4 >& /dev/null
modprobe ext4dev >& /dev/null
if grep ext4dev /proc/filesystems > /dev/null; then
@@ -132,13 +179,14 @@ else
FSTYPE=ext3
fi
if [ `uname -m` = "ppc64" ]; then
echo 'part None --fstype "PPC PReP Boot" --size 8' >> /tmp/partitioning
echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitioning
fi
if [ -d /sys/firmware/efi ]; then
echo 'part /boot/efi --size 50 --fstype vfat' >> /tmp/partitioning
echo 'part /boot/efi --size 50 --ondisk '$instdisk' --fstype vfat' >> /tmp/partitioning
fi
#TODO: ondisk detection, /dev/disk/by-id/edd-int13_dev80 for legacy maybe, and no idea about efi. at least maybe blacklist SAN if mptsas/mpt2sas/megaraid_sas seen...
echo "part swap --size 1024" >> /tmp/partitioning
echo "part / --size 1 --grow --fstype $FSTYPE" >> /tmp/partitioning
echo "part /boot --size 256 --fstype ext3 --ondisk $instdisk" >> /tmp/partitioning
echo "part swap --recommended --ondisk $instdisk" >> /tmp/partitioning
echo "part / --size 1 --grow --ondisk $instdisk --fstype $FSTYPE" >> /tmp/partitioning
@@ -113,11 +113,50 @@ chmod 755 /tmp/bar.awk
/tmp/bar.awk &
/tmp/foo.awk >/tmp/foo.log 2>&1 &
shopt -s nullglob
for disk in /dev/vd*[^0-9];do
if [ -z "$firstdirectdisk" ]; then firstdirectdisk=$disk; fi #remember first disk as a guess of medium resort
eddname=$(/lib/udev/edd_id $disk 2> /dev/null)
if [ ! -z "$eddname" -a "$eddname" = "int13_dev80" ]; then
instdisk=$disk
break
fi
done
if [ -z "$instdisk" ]; then
for disk in /dev/sd*[^0-9]; do
eddname=$(/lib/udev/edd_id $disk 2> /dev/null)
if [ ! -z "$eddname" -a "$eddname" = "int13_dev80" ]; then
instdisk=$disk
break
fi
currdriver=`udevadm info --attribute-walk --name $disk |grep DRIVERS|grep -v '""'|grep -v '"sd"'|head -n 1|sed -e 's/[^"]*"//' -e 's/"//'`
case "$currdriver" in
"ata_piix4"|"PMC MaxRAID"|"ahci"|"megaraid_sas") #certainly direct
if [ -z "$firstdirectdisk" ]; then firstdirectdisk=$disk; fi #remember first disk as a guess of medium resort
;;
"mptsas"|"mpt2sas") #*PROBABLY* not SAN, but SAS SAN is possible
if [ -z "$probablyfirstdirectdisk" ]; then probablyfirstdirectdisk=$disk; fi #remember first disk as a guess of medium resort
;;
*)
if [ -z "$firstdisk" ]; then firstdisk=$disk; fi #remember first disk as a guess of medium resort
;;
esac
done
fi
if [ -z "$instdisk" ]; then
if [ ! -z "$firstdirectdisk" ]; then
instdisk=$firstdirectdisk
elif [ ! -z "$probablyfirstdirectdisk" ]; then
instdisk=$probablyfirstdirectdisk
elif [ ! -z "$firstdisk" ]; then
instdisk=$firstdisk
fi
fi
if [ -d /sys/firmware/efi ]; then
sed -e 's!<device>XCATPARTITIONHOOK</device>!<device>/dev/sda</device><partitions config:type="list"><partition><filesystem config:type="symbol">vfat</filesystem><mount>/boot/efi</mount><size>128mb</size></partition><partition><mount>swap</mount><size>auto</size></partition><partition><mount>/</mount><size>auto</size></partition></partitions>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
sed -e 's!<device>XCATPARTITIONHOOK</device>!<device>'$instdisk'</device><partitions config:type="list"><partition><filesystem config:type="symbol">vfat</filesystem><mount>/boot/efi</mount><size>128mb</size></partition><partition><mount>swap</mount><size>auto</size></partition><partition><mount>/</mount><size>auto</size></partition></partitions>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
else
sed -e 's!<device>XCATPARTITIONHOOK</device>!<device>/dev/sda</device>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
sed -e 's!<device>XCATPARTITIONHOOK</device>!<device>'$instdisk'</device>!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
fi
]]>
@@ -44,80 +44,6 @@
</resource>
<sysfs_bus_id>0.0.0100</sysfs_bus_id>
</listentry>
<!-- Dasd attached at 0300 -->
<listentry>
<bus>None</bus>
<bus_hwcfg>none</bus_hwcfg>
<channel>0.0.0300</channel>
<dev_name>/dev/dasdb</dev_name>
<dev_names config:type="list">
<listentry>/dev/dasdb</listentry>
<listentry>/dev/disk/by-path/ccw-0.0.0300</listentry>
</dev_names>
<device>DASD</device>
<driver>io_subchannel</driver>
<drivers config:type="list">
<listentry>
<active config:type="boolean">true</active>
<modprobe config:type="boolean">true</modprobe>
<modules config:type="list">
<module_entry config:type="list">
<listentry>dasd_fba_mod</listentry>
<listentry></listentry>
</module_entry>
</modules>
</listentry>
</drivers>
<formatted config:type="boolean">true</formatted>
<partition_info>/dev/dasdb1</partition_info>
<resource>
<disk_log_geo config:type="list">
<listentry>
<heads config:type="integer">16</heads>
<sectors config:type="integer">128</sectors>
</listentry>
</disk_log_geo>
</resource>
<sysfs_bus_id>0.0.0300</sysfs_bus_id>
</listentry>
<!-- Dasd attached at 0301 -->
<listentry>
<bus>None</bus>
<bus_hwcfg>none</bus_hwcfg>
<channel>0.0.0301</channel>
<dev_name>/dev/dasdc</dev_name>
<dev_names config:type="list">
<listentry>/dev/dasdc</listentry>
<listentry>/dev/disk/by-path/ccw-0.0.0301</listentry>
</dev_names>
<device>DASD</device>
<driver>io_subchannel</driver>
<drivers config:type="list">
<listentry>
<active config:type="boolean">true</active>
<modprobe config:type="boolean">true</modprobe>
<modules config:type="list">
<module_entry config:type="list">
<listentry>dasd_fba_mod</listentry>
<listentry></listentry>
</module_entry>
</modules>
</listentry>
</drivers>
<formatted config:type="boolean">true</formatted>
<partition_info>/dev/dasdc1</partition_info>
<resource>
<disk_log_geo config:type="list">
<listentry>
<heads config:type="integer">16</heads>
<sectors config:type="integer">128</sectors>
</listentry>
</disk_log_geo>
</resource>
<sysfs_bus_id>0.0.0301</sysfs_bus_id>
</listentry>
</devices>
</dasd>
@@ -385,19 +311,6 @@
<module>dasd_eckd_mod</module>
<options></options>
</module_entry>
<module_entry>
<device>dasd-bus-ccw-0.0.0300</device>
<module>dasd_fba_mod</module>
<options></options>
</module_entry>
<module_entry>
<device>dasd-bus-ccw-0.0.0301</device>
<module>dasd_fba_mod</module>
<options></options>
</module_entry>
<module_entry>
<ccw_chan_ids>replace_ccw_chan_ids</ccw_chan_ids>
<ccw_chan_mode>replace_ccw_chan_mode</ccw_chan_mode>
@@ -443,6 +356,17 @@
<drive>
<device>/dev/dasda</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>512M</size>
</partition>
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">ext3</filesystem>
@@ -450,45 +374,7 @@
<mount>/</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
</partitions>
<use>all</use>
</drive>
<!-- Swap space -->
<drive>
<device>/dev/dasdb</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
</partitions>
<use>all</use>
</drive>
<!-- Swap space -->
<drive>
<device>/dev/dasdc</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_nr config:type="integer">2</partition_nr>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
@@ -547,7 +433,7 @@
replace_software_packages
</packages>
</software>
<!-- Time zone -->
<timezone>
@@ -44,80 +44,6 @@
</resource>
<sysfs_bus_id>0.0.0100</sysfs_bus_id>
</listentry>
<!-- Dasd attached at 0300 -->
<listentry>
<bus>None</bus>
<bus_hwcfg>none</bus_hwcfg>
<channel>0.0.0300</channel>
<dev_name>/dev/dasdb</dev_name>
<dev_names config:type="list">
<listentry>/dev/dasdb</listentry>
<listentry>/dev/disk/by-path/ccw-0.0.0300</listentry>
</dev_names>
<device>DASD</device>
<driver>io_subchannel</driver>
<drivers config:type="list">
<listentry>
<active config:type="boolean">true</active>
<modprobe config:type="boolean">true</modprobe>
<modules config:type="list">
<module_entry config:type="list">
<listentry>dasd_fba_mod</listentry>
<listentry></listentry>
</module_entry>
</modules>
</listentry>
</drivers>
<formatted config:type="boolean">true</formatted>
<partition_info>/dev/dasdb1</partition_info>
<resource>
<disk_log_geo config:type="list">
<listentry>
<heads config:type="integer">16</heads>
<sectors config:type="integer">128</sectors>
</listentry>
</disk_log_geo>
</resource>
<sysfs_bus_id>0.0.0300</sysfs_bus_id>
</listentry>
<!-- Dasd attached at 0301 -->
<listentry>
<bus>None</bus>
<bus_hwcfg>none</bus_hwcfg>
<channel>0.0.0301</channel>
<dev_name>/dev/dasdc</dev_name>
<dev_names config:type="list">
<listentry>/dev/dasdc</listentry>
<listentry>/dev/disk/by-path/ccw-0.0.0301</listentry>
</dev_names>
<device>DASD</device>
<driver>io_subchannel</driver>
<drivers config:type="list">
<listentry>
<active config:type="boolean">true</active>
<modprobe config:type="boolean">true</modprobe>
<modules config:type="list">
<module_entry config:type="list">
<listentry>dasd_fba_mod</listentry>
<listentry></listentry>
</module_entry>
</modules>
</listentry>
</drivers>
<formatted config:type="boolean">true</formatted>
<partition_info>/dev/dasdc1</partition_info>
<resource>
<disk_log_geo config:type="list">
<listentry>
<heads config:type="integer">16</heads>
<sectors config:type="integer">128</sectors>
</listentry>
</disk_log_geo>
</resource>
<sysfs_bus_id>0.0.0301</sysfs_bus_id>
</listentry>
</devices>
</dasd>
@@ -385,19 +311,6 @@
<module>dasd_eckd_mod</module>
<options></options>
</module_entry>
<module_entry>
<device>dasd-bus-ccw-0.0.0300</device>
<module>dasd_fba_mod</module>
<options></options>
</module_entry>
<module_entry>
<device>dasd-bus-ccw-0.0.0301</device>
<module>dasd_fba_mod</module>
<options></options>
</module_entry>
<module_entry>
<ccw_chan_ids>replace_ccw_chan_ids</ccw_chan_ids>
<ccw_chan_mode>replace_ccw_chan_mode</ccw_chan_mode>
@@ -443,6 +356,17 @@
<drive>
<device>/dev/dasda</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>512M</size>
</partition>
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">ext3</filesystem>
@@ -450,45 +374,7 @@
<mount>/</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
</partitions>
<use>all</use>
</drive>
<!-- Swap space -->
<drive>
<device>/dev/dasdb</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
</partitions>
<use>all</use>
</drive>
<!-- Swap space -->
<drive>
<device>/dev/dasdc</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_nr config:type="integer">2</partition_nr>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
@@ -0,0 +1,3 @@
@base
libapr1
@@ -0,0 +1,709 @@
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<mode>
<confirm config:type="boolean">false</confirm>
</mode>
<mouse>
<id>none</id>
</mouse>
<signature-handling/>
</general>
<!-- Groups to create on Linux -->
<groups config:type="list">
<group>
<groupname>users</groupname>
<userlist></userlist>
</group>
<group>
<groupname>floppy</groupname>
<userlist></userlist>
</group>
<group>
<groupname>bin</groupname>
<userlist>daemon</userlist>
</group>
<group>
<groupname>xok</groupname>
<userlist></userlist>
</group>
<group>
<groupname>nobody</groupname>
<userlist></userlist>
</group>
<group>
<groupname>modem</groupname>
<userlist></userlist>
</group>
<group>
<groupname>lp</groupname>
<userlist></userlist>
</group>
<group>
<groupname>tty</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>postfix</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>gdm</groupname>
<userlist></userlist>
</group>
<group>
<groupname>nogroup</groupname>
<userlist>nobody</userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>maildrop</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>messagebus</groupname>
<userlist></userlist>
</group>
<group>
<groupname>video</groupname>
<userlist></userlist>
</group>
<group>
<groupname>sys</groupname>
<userlist></userlist>
</group>
<group>
<groupname>shadow</groupname>
<userlist></userlist>
</group>
<group>
<groupname>console</groupname>
<userlist></userlist>
</group>
<group>
<groupname>cdrom</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>haldaemon</groupname>
<userlist></userlist>
</group>
<group>
<groupname>trusted</groupname>
<userlist></userlist>
</group>
<group>
<groupname>dialout</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>ts-shell</groupname>
<userlist></userlist>
</group>
<group>
<groupname>wheel</groupname>
<userlist></userlist>
</group>
<group>
<groupname>www</groupname>
<userlist></userlist>
</group>
<group>
<groupname>games</groupname>
<userlist></userlist>
</group>
<group>
<groupname>disk</groupname>
<userlist></userlist>
</group>
<group>
<groupname>audio</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>suse-ncc</groupname>
<userlist></userlist>
</group>
<group>
<groupname>ftp</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>at</groupname>
<userlist></userlist>
</group>
<group>
<groupname>kmem</groupname>
<userlist></userlist>
</group>
<group>
<groupname>public</groupname>
<userlist></userlist>
</group>
<group>
<groupname>root</groupname>
<userlist></userlist>
</group>
<group>
<groupname>mail</groupname>
<userlist></userlist>
</group>
<group>
<groupname>daemon</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>ntp</groupname>
<userlist></userlist>
</group>
<group>
<groupname>uucp</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>ntadmin</groupname>
<userlist></userlist>
</group>
<group>
<groupname>man</groupname>
<userlist></userlist>
</group>
<group>
<groupname>utmp</groupname>
<userlist></userlist>
</group>
<group>
<groupname>news</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>sshd</groupname>
<userlist></userlist>
</group>
</groups>
<!-- Contents of /etc/hosts -->
<host>
<hosts config:type="list">
<hosts_entry>
<host_address>127.0.0.1</host_address>
<names config:type="list">
<name>localhost</name>
</names>
</hosts_entry>
<hosts_entry>
<host_address>replace_host_address</host_address>
<names config:type="list">
<name>replace_long_name replace_short_name</name>
</names>
</hosts_entry>
</hosts>
</host>
<iscsi-client>
<initiatorname></initiatorname>
<targets config:type="list"/>
<version>1.0</version>
</iscsi-client>
<!-- Language setup (english) -->
<language>
<language>en_US</language>
<languages></languages>
</language>
<!-- Networking setup (DHCP) -->
<networking>
<dhcp_options>
<dhclient_additional_options></dhclient_additional_options>
<dhclient_client_id></dhclient_client_id>
<dhclient_hostname_option>AUTO</dhclient_hostname_option>
</dhcp_options>
<dns>
<dhcp_hostname config:type="boolean">true</dhcp_hostname>
<dhcp_resolv config:type="boolean">true</dhcp_resolv>
<domain>replace_domain</domain>
<hostname>replace_hostname</hostname>
<nameservers config:type="list">
<nameserver>replace_nameserver</nameserver>
</nameservers>
</dns>
<interfaces config:type="list">
<interface>
<bootproto>dhcp</bootproto>
<device>replace_device</device>
<lladdr>replace_lladdr</lladdr>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<managed config:type="boolean">false</managed>
<routing>
<ip_forward config:type="boolean">false</ip_forward>
<routes config:type="list">
<route>
<destination>default</destination>
<device>-</device>
<gateway>replace_gateway</gateway>
<netmask>replace_netmask</netmask>
</route>
</routes>
</routing>
</networking>
<nis>
<nis_broadcast config:type="boolean">false</nis_broadcast>
<nis_broken_server config:type="boolean">false</nis_broken_server>
<nis_by_dhcp config:type="boolean">false</nis_by_dhcp>
<nis_domain></nis_domain>
<nis_local_only config:type="boolean">false</nis_local_only>
<nis_options></nis_options>
<nis_other_domains config:type="list">
</nis_other_domains>
<nis_servers config:type="list"/>
<start_autofs config:type="boolean">false</start_autofs>
<start_nis config:type="boolean">false</start_nis>
</nis>
<!-- File system partitioning -->
<partitioning config:type="list">
<!-- Root partition and swap space -->
<drive>
<device>replace_root_device</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<mount>/</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<size>max</size>
</partition>
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>auto</size>
</partition>
</partitions>
<use>all</use>
</drive>
</partitioning>
<proxy>
<enabled config:type="boolean">false</enabled>
<ftp_proxy></ftp_proxy>
<http_proxy></http_proxy>
<https_proxy></https_proxy>
<no_proxy>localhost, 127.0.0.1</no_proxy>
<proxy_password></proxy_password>
<proxy_user></proxy_user>
</proxy>
<report>
<errors>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</errors>
<messages>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</messages>
<warnings>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</warnings>
<yesno_messages>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</yesno_messages>
</report>
<runlevel>
<default>5</default>
</runlevel>
<!-- Software to install on Linux -->
<software>
<patterns config:type="list">
replace_software_patterns
</patterns>
<packages config:type="list">
replace_software_packages
</packages>
</software>
<!-- Time zone -->
<timezone>
<hwclock>UTC</hwclock>
<timezone>US/Eastern</timezone>
</timezone>
<user_defaults>
<expire></expire>
<group>100</group>
<groups>video,dialout</groups>
<home>/home</home>
<inactive>-1</inactive>
<shell>/bin/bash</shell>
<skel>/etc/skel</skel>
</user_defaults>
<!-- Users on Linux -->
<users config:type="list">
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Games account</fullname>
<gid>100</gid>
<home>/var/games</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>12</uid>
<user_password>*</user_password>
<username>games</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>bin</fullname>
<gid>1</gid>
<home>/bin</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>1</uid>
<user_password>*</user_password>
<username>bin</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>nobody</fullname>
<gid>65533</gid>
<home>/var/lib/nobody</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>65534</uid>
<user_password>*</user_password>
<username>nobody</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Printing daemon</fullname>
<gid>7</gid>
<home>/var/spool/lpd</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>4</uid>
<user_password>*</user_password>
<username>lp</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Postfix Daemon</fullname>
<gid>51</gid>
<home>/var/spool/postfix</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/false</shell>
<uid>51</uid>
<user_password>!</user_password>
<username>postfix</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Novell Customer Center User</fullname>
<gid>106</gid>
<home>/var/lib/YaST2/suse-ncc-fakehome</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>102</uid>
<user_password>!</user_password>
<username>suse-ncc</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>FTP account</fullname>
<gid>49</gid>
<home>/srv/ftp</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>40</uid>
<user_password>*</user_password>
<username>ftp</username>
</user>
<user>
<encrypted config:type="boolean">false</encrypted>
<fullname>root</fullname>
<gid>0</gid>
<home>/root</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>0</uid>
<user_password>replace_root_password</user_password>
<username>root</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Mailer daemon</fullname>
<gid>12</gid>
<home>/var/spool/clientmqueue</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/false</shell>
<uid>8</uid>
<user_password>*</user_password>
<username>mail</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Daemon</fullname>
<gid>2</gid>
<home>/sbin</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>2</uid>
<user_password>*</user_password>
<username>daemon</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>NTP daemon</fullname>
<gid>103</gid>
<home>/var/lib/ntp</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/false</shell>
<uid>74</uid>
<user_password>!</user_password>
<username>ntp</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Unix-to-Unix CoPy system</fullname>
<gid>14</gid>
<home>/etc/uucp</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>10</uid>
<user_password>*</user_password>
<username>uucp</username>
</user>
<user>
<fullname>User for D-BUS</fullname>
<gid>101</gid>
<home>/var/run/dbus</home>
<shell>/bin/false</shell>
<uid>100</uid>
</user>
<user>
<fullname>User for haldaemon</fullname>
<gid>102</gid>
<home>/var/run/hal</home>
<shell>/bin/false</shell>
<uid>101</uid>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>WWW daemon apache</fullname>
<gid>8</gid>
<home>/var/lib/wwwrun</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/false</shell>
<uid>30</uid>
<user_password>*</user_password>
<username>wwwrun</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Manual pages viewer</fullname>
<gid>62</gid>
<home>/var/cache/man</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>13</uid>
<user_password>*</user_password>
<username>man</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>News system</fullname>
<gid>13</gid>
<home>/etc/news</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>9</uid>
<user_password>*</user_password>
<username>news</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>SSH daemon</fullname>
<gid>65</gid>
<home>/var/lib/sshd</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/false</shell>
<uid>71</uid>
<user_password>!</user_password>
<username>sshd</username>
</user>
</users>
<zfcp>
replace_zfcp
</zfcp>
<!-- Scripts (post-script) -->
<configure>
<scripts>
</scripts>
</configure>
</profile>
@@ -0,0 +1,3 @@
@base
libapr1
@@ -0,0 +1,709 @@
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<mode>
<confirm config:type="boolean">false</confirm>
</mode>
<mouse>
<id>none</id>
</mouse>
<signature-handling/>
</general>
<!-- Groups to create on Linux -->
<groups config:type="list">
<group>
<groupname>users</groupname>
<userlist></userlist>
</group>
<group>
<groupname>floppy</groupname>
<userlist></userlist>
</group>
<group>
<groupname>bin</groupname>
<userlist>daemon</userlist>
</group>
<group>
<groupname>xok</groupname>
<userlist></userlist>
</group>
<group>
<groupname>nobody</groupname>
<userlist></userlist>
</group>
<group>
<groupname>modem</groupname>
<userlist></userlist>
</group>
<group>
<groupname>lp</groupname>
<userlist></userlist>
</group>
<group>
<groupname>tty</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>postfix</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>gdm</groupname>
<userlist></userlist>
</group>
<group>
<groupname>nogroup</groupname>
<userlist>nobody</userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>maildrop</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>messagebus</groupname>
<userlist></userlist>
</group>
<group>
<groupname>video</groupname>
<userlist></userlist>
</group>
<group>
<groupname>sys</groupname>
<userlist></userlist>
</group>
<group>
<groupname>shadow</groupname>
<userlist></userlist>
</group>
<group>
<groupname>console</groupname>
<userlist></userlist>
</group>
<group>
<groupname>cdrom</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>haldaemon</groupname>
<userlist></userlist>
</group>
<group>
<groupname>trusted</groupname>
<userlist></userlist>
</group>
<group>
<groupname>dialout</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>ts-shell</groupname>
<userlist></userlist>
</group>
<group>
<groupname>wheel</groupname>
<userlist></userlist>
</group>
<group>
<groupname>www</groupname>
<userlist></userlist>
</group>
<group>
<groupname>games</groupname>
<userlist></userlist>
</group>
<group>
<groupname>disk</groupname>
<userlist></userlist>
</group>
<group>
<groupname>audio</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>suse-ncc</groupname>
<userlist></userlist>
</group>
<group>
<groupname>ftp</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>at</groupname>
<userlist></userlist>
</group>
<group>
<groupname>kmem</groupname>
<userlist></userlist>
</group>
<group>
<groupname>public</groupname>
<userlist></userlist>
</group>
<group>
<groupname>root</groupname>
<userlist></userlist>
</group>
<group>
<groupname>mail</groupname>
<userlist></userlist>
</group>
<group>
<groupname>daemon</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>ntp</groupname>
<userlist></userlist>
</group>
<group>
<groupname>uucp</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>ntadmin</groupname>
<userlist></userlist>
</group>
<group>
<groupname>man</groupname>
<userlist></userlist>
</group>
<group>
<groupname>utmp</groupname>
<userlist></userlist>
</group>
<group>
<groupname>news</groupname>
<userlist></userlist>
</group>
<group>
<group_password>!</group_password>
<groupname>sshd</groupname>
<userlist></userlist>
</group>
</groups>
<!-- Contents of /etc/hosts -->
<host>
<hosts config:type="list">
<hosts_entry>
<host_address>127.0.0.1</host_address>
<names config:type="list">
<name>localhost</name>
</names>
</hosts_entry>
<hosts_entry>
<host_address>replace_host_address</host_address>
<names config:type="list">
<name>replace_long_name replace_short_name</name>
</names>
</hosts_entry>
</hosts>
</host>
<iscsi-client>
<initiatorname></initiatorname>
<targets config:type="list"/>
<version>1.0</version>
</iscsi-client>
<!-- Language setup (english) -->
<language>
<language>en_US</language>
<languages></languages>
</language>
<!-- Networking setup (DHCP) -->
<networking>
<dhcp_options>
<dhclient_additional_options></dhclient_additional_options>
<dhclient_client_id></dhclient_client_id>
<dhclient_hostname_option>AUTO</dhclient_hostname_option>
</dhcp_options>
<dns>
<dhcp_hostname config:type="boolean">true</dhcp_hostname>
<dhcp_resolv config:type="boolean">true</dhcp_resolv>
<domain>replace_domain</domain>
<hostname>replace_hostname</hostname>
<nameservers config:type="list">
<nameserver>replace_nameserver</nameserver>
</nameservers>
</dns>
<interfaces config:type="list">
<interface>
<bootproto>dhcp</bootproto>
<device>replace_device</device>
<lladdr>replace_lladdr</lladdr>
<startmode>auto</startmode>
<usercontrol>no</usercontrol>
</interface>
</interfaces>
<managed config:type="boolean">false</managed>
<routing>
<ip_forward config:type="boolean">false</ip_forward>
<routes config:type="list">
<route>
<destination>default</destination>
<device>-</device>
<gateway>replace_gateway</gateway>
<netmask>replace_netmask</netmask>
</route>
</routes>
</routing>
</networking>
<nis>
<nis_broadcast config:type="boolean">false</nis_broadcast>
<nis_broken_server config:type="boolean">false</nis_broken_server>
<nis_by_dhcp config:type="boolean">false</nis_by_dhcp>
<nis_domain></nis_domain>
<nis_local_only config:type="boolean">false</nis_local_only>
<nis_options></nis_options>
<nis_other_domains config:type="list">
</nis_other_domains>
<nis_servers config:type="list"/>
<start_autofs config:type="boolean">false</start_autofs>
<start_nis config:type="boolean">false</start_nis>
</nis>
<!-- File system partitioning -->
<partitioning config:type="list">
<!-- Root partition and swap space -->
<drive>
<device>replace_root_device</device>
<partitions config:type="list">
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<mount>/</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<size>max</size>
</partition>
<partition>
<create config:type="boolean">true</create>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<mountby config:type="symbol">path</mountby>
<partition_id config:type="integer">131</partition_id>
<partition_nr config:type="integer">1</partition_nr>
<partition_type>primary</partition_type>
<size>auto</size>
</partition>
</partitions>
<use>all</use>
</drive>
</partitioning>
<proxy>
<enabled config:type="boolean">false</enabled>
<ftp_proxy></ftp_proxy>
<http_proxy></http_proxy>
<https_proxy></https_proxy>
<no_proxy>localhost, 127.0.0.1</no_proxy>
<proxy_password></proxy_password>
<proxy_user></proxy_user>
</proxy>
<report>
<errors>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</errors>
<messages>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</messages>
<warnings>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</warnings>
<yesno_messages>
<log config:type="boolean">true</log>
<show config:type="boolean">true</show>
<timeout config:type="integer">0</timeout>
</yesno_messages>
</report>
<runlevel>
<default>5</default>
</runlevel>
<!-- Software to install on Linux -->
<software>
<patterns config:type="list">
replace_software_patterns
</patterns>
<packages config:type="list">
replace_software_packages
</packages>
</software>
<!-- Time zone -->
<timezone>
<hwclock>UTC</hwclock>
<timezone>US/Eastern</timezone>
</timezone>
<user_defaults>
<expire></expire>
<group>100</group>
<groups>video,dialout</groups>
<home>/home</home>
<inactive>-1</inactive>
<shell>/bin/bash</shell>
<skel>/etc/skel</skel>
</user_defaults>
<!-- Users on Linux -->
<users config:type="list">
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Games account</fullname>
<gid>100</gid>
<home>/var/games</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>12</uid>
<user_password>*</user_password>
<username>games</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>bin</fullname>
<gid>1</gid>
<home>/bin</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>1</uid>
<user_password>*</user_password>
<username>bin</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>nobody</fullname>
<gid>65533</gid>
<home>/var/lib/nobody</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>65534</uid>
<user_password>*</user_password>
<username>nobody</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Printing daemon</fullname>
<gid>7</gid>
<home>/var/spool/lpd</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>4</uid>
<user_password>*</user_password>
<username>lp</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Postfix Daemon</fullname>
<gid>51</gid>
<home>/var/spool/postfix</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/false</shell>
<uid>51</uid>
<user_password>!</user_password>
<username>postfix</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Novell Customer Center User</fullname>
<gid>106</gid>
<home>/var/lib/YaST2/suse-ncc-fakehome</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>102</uid>
<user_password>!</user_password>
<username>suse-ncc</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>FTP account</fullname>
<gid>49</gid>
<home>/srv/ftp</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>40</uid>
<user_password>*</user_password>
<username>ftp</username>
</user>
<user>
<encrypted config:type="boolean">false</encrypted>
<fullname>root</fullname>
<gid>0</gid>
<home>/root</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>0</uid>
<user_password>replace_root_password</user_password>
<username>root</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Mailer daemon</fullname>
<gid>12</gid>
<home>/var/spool/clientmqueue</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/false</shell>
<uid>8</uid>
<user_password>*</user_password>
<username>mail</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Daemon</fullname>
<gid>2</gid>
<home>/sbin</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>2</uid>
<user_password>*</user_password>
<username>daemon</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>NTP daemon</fullname>
<gid>103</gid>
<home>/var/lib/ntp</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/false</shell>
<uid>74</uid>
<user_password>!</user_password>
<username>ntp</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Unix-to-Unix CoPy system</fullname>
<gid>14</gid>
<home>/etc/uucp</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>10</uid>
<user_password>*</user_password>
<username>uucp</username>
</user>
<user>
<fullname>User for D-BUS</fullname>
<gid>101</gid>
<home>/var/run/dbus</home>
<shell>/bin/false</shell>
<uid>100</uid>
</user>
<user>
<fullname>User for haldaemon</fullname>
<gid>102</gid>
<home>/var/run/hal</home>
<shell>/bin/false</shell>
<uid>101</uid>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>WWW daemon apache</fullname>
<gid>8</gid>
<home>/var/lib/wwwrun</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/false</shell>
<uid>30</uid>
<user_password>*</user_password>
<username>wwwrun</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>Manual pages viewer</fullname>
<gid>62</gid>
<home>/var/cache/man</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>13</uid>
<user_password>*</user_password>
<username>man</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>News system</fullname>
<gid>13</gid>
<home>/etc/news</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max></max>
<min></min>
<warn></warn>
</password_settings>
<shell>/bin/bash</shell>
<uid>9</uid>
<user_password>*</user_password>
<username>news</username>
</user>
<user>
<encrypted config:type="boolean">true</encrypted>
<fullname>SSH daemon</fullname>
<gid>65</gid>
<home>/var/lib/sshd</home>
<password_settings>
<expire></expire>
<flag></flag>
<inact></inact>
<max>99999</max>
<min>0</min>
<warn>7</warn>
</password_settings>
<shell>/bin/false</shell>
<uid>71</uid>
<user_password>!</user_password>
<username>sshd</username>
</user>
</users>
<zfcp>
replace_zfcp
</zfcp>
<!-- Scripts (post-script) -->
<configure>
<scripts>
</scripts>
</configure>
</profile>
@@ -28,6 +28,8 @@ my $pathtofiles=dirname($0);
my $fullpath=realpath($pathtofiles);
my $name = basename($0);
my $onlyinitrd=0;
#that this method of calling genimage is no longer used
if ($name =~ /geninitrd/) {
$onlyinitrd=1;
}
@@ -81,6 +83,7 @@ GetOptions(
'postinstall=s' => \$postinstall_filename, #internal flag
'rootimgdir=s' => \$destdir, #internal flag
'interactive' =>\$prompt,
'onlyinitrd' =>\$onlyinitrd,
);
if (@ARGV > 0) {
@@ -33,6 +33,7 @@ my $pathtofiles=dirname($0);
my $fullpath=realpath($pathtofiles);
my $name = basename($0);
my $onlyinitrd=0;
#that this method of calling genimage is no longer used
if ($name =~ /geninitrd/) {
$onlyinitrd=1;
}
@@ -85,6 +86,7 @@ GetOptions(
'postinstall=s' => \$postinstall_filename, #internal flag
'rootimgdir=s' => \$destdir, #internal flag
'interactive' =>\$prompt,
'onlyinitrd' =>\$onlyinitrd,
);
if (@ARGV > 0) {
+4 -1
View File
@@ -36,6 +36,7 @@ my $pathtofiles=dirname($0);
my $fullpath=realpath($pathtofiles);
my $name = basename($0);
my $onlyinitrd=0;
#that this method of calling genimage is no longer used
if ($name =~ /geninitrd/) {
$onlyinitrd=1;
}
@@ -86,6 +87,7 @@ GetOptions(
'postinstall=s' => \$postinstall_filename, #internal flag
'rootimgdir=s' => \$destdir, #internal flag
'interactive' =>\$prompt,
'onlyinitrd' =>\$onlyinitrd,
);
if (@ARGV > 0) {
@@ -458,7 +460,8 @@ unlink "/tmp/genimage.$$.yum.conf";
if (-d "$rootimg_dir/usr/share/dracut") {
$dracutmode = 1;
# get dracut version
my $dracutver = `rpm -R $rootimg_dir -qi dracut | grep Version | awk -F' ' '{print \$3}'`;
my $dracutver = `rpm --root $rootimg_dir -qi dracut | grep Version | awk -F' ' '{print \$3}'`;
chomp($dracutver);
if ($dracutver =~ /^\d\d\d$/) {
if ($dracutver >= "009") {
$dracutdir = "dracut_009";
+4 -1
View File
@@ -34,6 +34,7 @@ my $pathtofiles=dirname($0);
my $fullpath=realpath($pathtofiles);
my $name = basename($0);
my $onlyinitrd=0;
#that this method of calling genimage is no longer used
if ($name =~ /geninitrd/) {
$onlyinitrd=1;
}
@@ -102,6 +103,7 @@ GetOptions(
'postinstall=s' => \$postinstall_filename, #internal flag
'rootimgdir=s' => \$destdir, #internal flag
'interactive' =>\$prompt,
'onlyinitrd' =>\$onlyinitrd,
);
if (@ARGV > 0) {
@@ -1525,7 +1527,8 @@ sub generic_post { # This function is meant to leave the image in a state approx
copy("$installroot/postscripts/xcatpostinit", "$rootimg_dir/etc/init.d/xcatpostinit");
chmod(0755, "$rootimg_dir/etc/init.d/xcatpostinit");
system("chroot $rootimg_dir insserv gettyset xcatpostinit");
#add -f option to ignore the dependecy on sles10.4
system("chroot $rootimg_dir insserv -f network sshd gettyset xcatpostinit");
my $rc = system("grep sshd $rootimg_dir/etc/init.d/.depend.start | grep TARGETS");
if ($rc) {
+3 -1
View File
@@ -28,6 +28,7 @@ my $pathtofiles=dirname($0);
my $fullpath=realpath($pathtofiles);
my $name = basename($0);
my $onlyinitrd=0;
#that this method of calling genimage is no longer used
if ($name =~ /geninitrd/) {
$onlyinitrd=1;
}
@@ -77,7 +78,8 @@ GetOptions(
'r=s' => \$othernics,
'l=s' => \$rootlimit,
't=s' => \$tmplimit,
'k=s' => \$kernelver
'k=s' => \$kernelver,
'onlyinitrd' =>\$onlyinitrd,
);
if (@ARGV > 0) {
$imagename=$ARGV[0];
@@ -28,6 +28,7 @@ my $pathtofiles=dirname($0);
my $fullpath=realpath($pathtofiles);
my $name = basename($0);
my $onlyinitrd=0;
#that this method of calling genimage is no longer used
if ($name =~ /geninitrd/) {
$onlyinitrd=1;
}
@@ -81,6 +82,7 @@ GetOptions(
'postinstall=s' => \$postinstall_filename, #internal flag
'rootimgdir=s' => \$destdir, #internal flag
'interactive' =>\$prompt,
'onlyinitrd' =>\$onlyinitrd,
);
+1 -1
View File
@@ -427,7 +427,7 @@ export SEP_INSTALL_PATH=/tmp
# UXSPI environment variable
export UXLITE_CLEAN_INVFILE=1
export UXSPI_CLEAN_INVFILE=1
export UXSPI_BINARY_PATH=`find /toolscenter/uxspi -name 'uxspi*.anyos' | sort | tail -n 1`
export UXSPI_BINARY_PATH=`find /toolscenter/uxspi -name '*uxspi*.anyos*' | sort | tail -n 1`
export UXSPI_GUI_CMD="xterm -geometry 168x58+5+5 +sb -e ${UXSPI_BINARY_PATH}"
export UXSPI_TUI_CMD="${UXSPI_BINARY_PATH} update --tui --firmware -l ${UXSPI_BOOTABLE} --timeout=${UXSPI_TIMEOUT}"
+106 -26
View File
@@ -25,7 +25,7 @@ for i in `/bin/cat /proc/cmdline`; do
MACX=`/sbin/ip link show $ETHX | /bin/grep ether | /bin/awk '{print $2}'`
break
elif [ "$KEY" = "BOOTIF" ]; then
MACX=`/bin/echo $i | /bin/awk -F= '{print $2}'`
MACX=`/bin/echo $i | /bin/awk -F= '{print $2}'|sed -e s/^01-// -e s/-/:/g`
ETHX=`/sbin/ifconfig | /bin/grep -i $MACX | /bin/awk '{print $1}'`
break
fi
@@ -96,36 +96,116 @@ if [ ! -z "$DUMP" ]; then
else
MOUNTPATH="/var/tmp"
fi
/bin/mount $KDIP:$KDPATH $MOUNTPATH
if [ "$KDPROTO" = "nfs" ]; then
if (pmatch $OSVER "sles*") || (pmatch $OSVER "suse*") || [ -f /etc/SuSE-release ]; then
KDTEMPPATH=${KDPATH//\//\\\/}
KDTEMPPATH="nfs:\/\/${KDIP}${KDTEMPPATH}\/${NODE}"
sed -i "s/^KDUMP_SAVEDIR=.*$/KDUMP_SAVEDIR=\"${KDTEMPPATH}\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_COPY_KERNEL=.*$/KDUMP_COPY_KERNEL=\"no\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_PRESCRIPT=.*$/KDUMP_PRESCRIPT=\"\/tmp\/createdir\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_REQUIRED_PROGRAMS=.*$/KDUMP_REQUIRED_PROGRAMS=\"\/tmp\/createdir\"/" /etc/sysconfig/kdump
TEMPDELAY=$(($RANDOM%30))
#work around for the kdump on sles 11.2
echo "/bin/mkdir -p /root/tmp/" > /tmp/createdir
#following 5 lines is the work around for kdump on multiply nodes
echo "/bin/sleep ${TEMPDELAY}" >> /tmp/createdir
echo "/bin/mount -o nolock ${KDIP}:${KDPATH} /tmp" >> /tmp/createdir
echo "/bin/mkdir -p /tmp/${NODE}" >> /tmp/createdir
echo "/bin/sleep ${TEMPDELAY}" >> /tmp/createdir
echo "/bin/umount /tmp" >> /tmp/createdir
/bin/chmod 777 /tmp/createdir
#change the mount and remount shell scripts' name, workaround for kdump on stateless node
oldmount=`ls /lib/mkinitrd/boot/*-mount.sh`
oldremount=`ls /lib/mkinitrd/boot/*-remount.sh`
mv $oldmount ${oldmount}.bak
mv $oldremount ${oldremount}.bak
/etc/init.d/boot.kdump restart
mv ${oldmount}.bak $oldmount
mv ${oldremount}.bak $oldremount
if (pmatch $OSVER "*10*"); then
#run mkinitrd to generater the kdump-init base
if (pmatch $ARCH "x86*"); then
/sbin/mkinitrd -m "nfs tg3 bnx2 bnx2x e1000 e1000e igb mlx_en be2net af_packet firmware_class"
else
/sbin/mkinitrd -m "nfs be2net e1000e ibmveth igb firmware_class tg3 e1000"
fi
/bin/mkdir -p /var/tmp/tempinit
cd /boot/
KDUMPINIT=`ls initrd-*-kdump`
/bin/cp /boot/${KDUMPINIT} /var/tmp/tempinit/
#change to the /var/tmp/tempinit/ directory
cd /var/tmp/tempinit/
/bin/zcat ${KDUMPINIT} | /bin/cpio -id
/bin/rm -f ${KDUMPINIT}
/bin/mkdir -p ./var/lib/dhcpcd/
/bin/mkdir -p ./lib/udev/devices/
if (pmatch $ARCH "ppc*"); then
/bin/mkdir -p ./lib/power6/
/bin/mkdir -p ./lib/power7/
fi
/bin/cp -r /lib/udev/devices/* ./lib/udev/devices/
for file in "/sbin/ifconfig /usr/bin/clear /bin/touch /bin/grep /sbin/dhcpcd /sbin/ip /bin/awk /bin/makedumpfile"
do
for line in `ldd $file`
do
if [ ${line:0:1} = "/" ]; then
line=`echo $line | grep -v :`
if [ $line ];then
if [ ! -e .$line ];then
/bin/cp -L $line .$line
fi
fi
fi
done
/bin/cp $file "./bin/"
done
#modify the original init to support dump to an nfs server
cat > ./bin/dumpfile << EOF
#!/bin/bash
if [ -e /proc/vmcore ];then
/bin/touch /var/lib/dhcpcd/dhcpcd-$ETHX.info
for i in 1 2 3 4 5 6 7 8 9 10
do
/bin/dhcpcd $ETHX
/bin/sleep 2
temp=\`/bin/ifconfig | /bin/grep inet\`
if [ -n "\$temp" ]; then
break
fi
echo -e "Failed to acquire address, retrying"
done
if [ -z "\$temp" ];then
exit
fi
HOSTNAME=`hostname`
/bin/mkdir /mnt
/bin/mount -t nfs -o nolock ${KDIP}:${KDPATH} /mnt
if [ -e /mnt/$HOSTNAME ];then
/bin/rm -f /mnt/$HOSTNAME
fi
/bin/makedumpfile -c /proc/vmcore /mnt/$HOSTNAME
/bin/umount -l /mnt
/sbin/reboot -d -f
fi
EOF
chmod a+x ./bin/dumpfile
/bin/sed -i "s/^# No multipath support/ \/bin\/dumpfile\n/" ./init
/bin/rm -f /boot/${KDUMPINIT}
/usr/bin/find . | cpio -H newc -o|gzip -9 -c - > /boot/${KDUMPINIT}
cd /
/bin/rm -rf "/var/tmp/tempinit"
service kdump restart
else
/bin/mount -o nolock $KDIP:$KDPATH $MOUNTPATH
KDTEMPPATH=${KDPATH//\//\\\/}
KDTEMPPATH="nfs:\/\/${KDIP}${KDTEMPPATH}\/${NODE}"
sed -i "s/^KDUMP_SAVEDIR=.*$/KDUMP_SAVEDIR=\"${KDTEMPPATH}\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_COPY_KERNEL=.*$/KDUMP_COPY_KERNEL=\"no\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_PRESCRIPT=.*$/KDUMP_PRESCRIPT=\"\/tmp\/createdir\"/" /etc/sysconfig/kdump
sed -i "s/^KDUMP_REQUIRED_PROGRAMS=.*$/KDUMP_REQUIRED_PROGRAMS=\"\/tmp\/createdir\"/" /etc/sysconfig/kdump
TEMPDELAY=$(($RANDOM%30))
#work around for the kdump on sles 11.2
echo "/bin/mkdir -p /root/tmp/" > /tmp/createdir
#following 5 lines is the work around for kdump on multiply nodes
echo "/bin/sleep ${TEMPDELAY}" >> /tmp/createdir
echo "/bin/mount -o nolock ${KDIP}:${KDPATH} /tmp" >> /tmp/createdir
echo "/bin/mkdir -p /tmp/${NODE}" >> /tmp/createdir
echo "/bin/sleep ${TEMPDELAY}" >> /tmp/createdir
echo "/bin/umount /tmp" >> /tmp/createdir
/bin/chmod 777 /tmp/createdir
#change the mount and remount shell scripts' name, workaround for kdump on stateless node
oldmount=`ls /lib/mkinitrd/boot/*-mount.sh`
oldremount=`ls /lib/mkinitrd/boot/*-remount.sh`
mv $oldmount ${oldmount}.bak
mv $oldremount ${oldremount}.bak
/etc/init.d/boot.kdump restart
mv ${oldmount}.bak $oldmount
mv ${oldremount}.bak $oldremount
fi
else
if (pmatch $OSVER "fedora*") || (pmatch $OSVER "rhel6*") || (pmatch $OSVER "rhels6*") || [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ];then
/bin/mount -o nolock $KDIP:$KDPATH $MOUNTPATH
echo "net $KDIP:$KDPATH" > /etc/kdump.conf
echo "link_delay 180" >> /etc/kdump.conf
/etc/init.d/kdump restart
+18 -1
View File
@@ -24,12 +24,17 @@ Conflicts: xCATsn
Requires: xCAT-server xCAT-client perl-DBD-SQLite
%ifos linux
Requires: dhcp httpd nfs-utils expect nmap bind perl-XML-Parser vsftpd perl(CGI)
Requires: httpd nfs-utils expect nmap bind perl-XML-Parser vsftpd perl(CGI)
# On RHEL this pulls in dhcp, on SLES it pulls in dhcp-server
Requires: /usr/sbin/dhcpd
%ifnarch s390x
Requires: /etc/xinetd.d/tftp
# yaboot-xcat is pulled in so any MN can manage ppc nodes
Requires: conserver-xcat yaboot-xcat perl-Net-Telnet fping
%endif
%ifarch ppc64
Requires: perl-IO-Stty
%endif
%endif
%ifarch i386 i586 i686 x86 x86_64
@@ -127,6 +132,8 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT
%post
# create dir for the current pid
mkdir -p /var/run/xcat
%ifnos linux
. /etc/profile
%else
@@ -136,6 +143,16 @@ cp -f $RPM_INSTALL_PREFIX0/share/xcat/scripts/xHRM /install/postscripts/
if [ "$1" = "1" ]; then #Only if installing for the first time..
$RPM_INSTALL_PREFIX0/sbin/xcatconfig -i
else
if [ -r "/tmp/xcat/installservice.pid" ]; then
mv /tmp/xcat/installservice.pid /var/run/xcat/installservice.pid
fi
if [ -r "/tmp/xcat/udpservice.pid" ]; then
mv /tmp/xcat/udpservice.pid /var/run/xcat/udpservice.pid
fi
if [ -r "/tmp/xcat/mainservice.pid" ]; then
mv /tmp/xcat/mainservice.pid /var/run/xcat/mainservice.pid
fi
$RPM_INSTALL_PREFIX0/sbin/xcatconfig -u
fi
exit 0
+6 -1
View File
@@ -24,12 +24,17 @@ Requires: perl-XML-Parser
Conflicts: xCAT
%ifos linux
Requires: dhcp httpd nfs-utils expect nmap fping bind perl-XML-Parser vsftpd
Requires: httpd nfs-utils expect nmap fping bind perl-XML-Parser vsftpd
# On RHEL this pulls in dhcp, on SLES it pulls in dhcp-server
Requires: /usr/sbin/dhcpd
%ifnarch s390x
Requires: /etc/xinetd.d/tftp
# yaboot-xcat is pulled in so any SN can manage ppc nodes
Requires: conserver-xcat yaboot-xcat perl-Net-Telnet
%endif
%ifarch ppc64
Requires: perl-IO-Stty
%endif
%endif
%ifarch i386 i586 i686 x86 x86_64