Compare commits

...

447 Commits

Author SHA1 Message Date
wanghuaz 3d51e0acfe Fixing bug 3568357: Overwrite the swapnfs tmp file instead of append it.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@13844 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-09-19 05:49:53 +00:00
linggao 37d53860a9 fixed the problem in rmc performance monitorng, it will ingore the error nodes instead of quiting
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12570 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-05-08 17:57:45 +00:00
jwsimpson fba0dc5518 Defect 3514607 - RPM checks for ifix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12305 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-23 20:52:13 +00:00
zhaoertao 26544fac91 fix bug 3511324: rpower got uncorrect output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12267 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-19 06:54:16 +00:00
jwsimpson fa6f82b45e Defect 3469202 - PMR PMR29062 - update to rinv man page for deconfig
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12262 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-18 19:49:45 +00:00
lissav 2754de946a fix syntax
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12166 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-09 19:10:10 +00:00
linggao 1a02dbaa18 fix the error callback in dhcp.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12125 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-04 20:12:11 +00:00
linggao a86152d7a3 using conserver-xcat instead of conserver for 2.6.12
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12109 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-03 19:21:27 +00:00
lissav 5f8f907ead fix defect 3513526
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12099 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-04-02 20:12:54 +00:00
wanghuaz 599fecd530 add minor change to last checkin
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12041 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-29 02:55:13 +00:00
jjhua 891478c649 Fixed defect 491152, the Node not found issue of rpower state
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@12016 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-27 05:16:27 +00:00
sjing 797506ec8b enhanced logging in aixlitesetup.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11999 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-26 05:56:30 +00:00
wanghuaz 16c7d16609 add the support to delete all multiple mac addresses from lease file
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11997 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-26 03:59:39 +00:00
bp-sawyers e50d066c0b Fix bug in buildcore.sh where it would not uppercase the args in some cases
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11978 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-24 13:25:10 +00:00
lissav c683aac291 check for AIX in otherpkgs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11948 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-22 13:57:59 +00:00
sjing ea2730d251 fix for the issue xcatd restart failed on SN if there is IPv6 network entry in xcat networks table.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11920 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-21 02:54:55 +00:00
sjing c9a613b258 fix for the issue xcatd restart failed on SN if there is IPv6 network entry in xcat networks table.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11919 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-21 02:52:26 +00:00
nott 4b10a30ae7 fix for rc.dd_boot script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11896 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-19 19:40:25 +00:00
nott 5fc5a13dad fix for rc.dd_boot script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11895 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-19 18:38:55 +00:00
bp-sawyers 5663321c9e Update version of 2.6 branch to 2.6.12
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11878 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-15 19:45:17 +00:00
lissav 458932d0cf fix defect 3502735
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11825 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-12 17:04:52 +00:00
nott abeffffccf fix statelite and mkdsklsnode node issue
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11796 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-08 13:43:10 +00:00
bp-sawyers cc332eaa90 Fixed bug 3496915: svn revision # not showing for -v flags
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11780 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-07 11:38:33 +00:00
zhaoertao d8495d188f modify the output about 'lsvm <noderange>'
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11737 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-05 02:05:05 +00:00
lissav 727fdd1355 fix defect 3495906
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11728 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-03-02 12:30:27 +00:00
lissav 9083c12dfd fix defect 3474407
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11677 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-24 13:17:05 +00:00
yinle 770c42c5eb Fix bug 3482039 :Missing information in "rmhwconn" manual
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11663 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-22 03:28:22 +00:00
daniceexi f9dc643d03 Update the man page of mkvm,rmvm,lsvm for KVM and Vmware managed virtual machine
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11628 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-20 01:12:19 +00:00
nott c8e52db261 fix image_data issue
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11626 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-19 19:31:38 +00:00
nott 1e32434db2 fix rpm flags issue
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11625 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-19 18:35:15 +00:00
sjing 768595be98 the fix for hostname alias
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11594 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-16 02:43:01 +00:00
nott d83bf2204d clarify emgr support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11590 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 21:07:17 +00:00
nott 23f608aa6a clarify emgr support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11588 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 20:55:25 +00:00
nott dd74ef9864 clarify emgr support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11586 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 20:30:47 +00:00
nott c75d5faa69 fix emgr support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11583 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 20:09:45 +00:00
nott d8dc3d2d30 fix emgr support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11582 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 18:41:32 +00:00
nott ac02f48b02 fix emgr support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11580 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 15:10:50 +00:00
lissav 29dbe12954 fix recursive listing of all /install breaks AIX on large systems
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11578 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 11:12:12 +00:00
ligc b77cdef661 fix for bug 3460128: run vpdupdate only when necessary
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11573 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-15 02:56:33 +00:00
wanghuaz 39fa86cb28 backout the commit 11531 and 11532 in 2.6 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11534 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-10 06:29:52 +00:00
wanghuaz d55b923701 Replace 'zerombr yes' with 'zerombr' for rhels6 according to red hat bugzilla 241666
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11532 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-10 06:12:24 +00:00
wanghuaz 78fbcca2da Replace 'zerombr yes' with 'zerombr' for rhels6 according to red hat bugzilla 241666
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11531 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-10 06:11:03 +00:00
wanghuaz cfe62b8164 Changed the description of this script, added traces to syslog for AIX and Linux, and make it more readable
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11523 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-09 11:20:24 +00:00
linggao 8392a75e94 fixed a bug for nodestatus
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11518 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-08 18:32:16 +00:00
lissav 4e957afe1b fix defect 3485485
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11516 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-08 17:01:31 +00:00
lissav 3e6f294d0f fix for 3485080 syspowerinterval not being honored
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11503 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-07 15:47:33 +00:00
lissav f2b43dc313 fix build use /bin/ksh path
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11497 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-07 12:59:07 +00:00
jjhua 7e3ccd6a52 for rflash on linux hierachical, if the installloc in the site table isn't set, copy the rpms to the service node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11494 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-07 06:10:40 +00:00
lissav 55a4562ab9 fix defect 3485029 adding Utils.pm to servicenode postscript will break the diskfull Linux install
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11490 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-06 17:55:16 +00:00
lissav 08d8fd84d7 add check for request processed
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11488 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-06 12:54:13 +00:00
wanghuaz 345ab8eea2 Fixing bug 3165548: adding several useful and small packages
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11484 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-06 03:18:26 +00:00
wanghuaz d465521d80 Fixing bug 3165548: adding several useful and small packages
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11483 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-06 03:16:55 +00:00
wanghuaz b3122827ad Fixing bug 3165548: adding several useful and small packages
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11482 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-06 03:15:06 +00:00
sjing 6c42d488fc fix for the problem when mn configured with global ipv6 address.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11464 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-03 09:53:09 +00:00
yinle 5e482788b8 Fix bug 3467860, xcatsetup: the IP of fsp 40.63.01.2 has 0 at head of a part
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11460 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-03 02:50:21 +00:00
lissav e0bc7d22b4 improvements due to 3482239
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11454 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-02-02 12:30:57 +00:00
lissav 22dc829935 more changes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11447 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-31 21:18:49 +00:00
nott a3ebc13326 change rpm default and add test
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11446 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-31 20:49:46 +00:00
lissav 607364ef5d fix script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11436 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-30 17:16:29 +00:00
lissav 40d212ba32 update script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11434 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-30 12:01:16 +00:00
zhaoertao ede853a539 fix bug 3472764:incorrect return information for rspconfig
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11433 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-30 06:36:33 +00:00
lissav 78028fe71d sample script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11423 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-27 15:47:54 +00:00
nott 833b460f10 fix for bug #3474362
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11418 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-26 16:30:19 +00:00
nott ec93453019 addtional mknimimage output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11411 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-24 21:03:11 +00:00
nott de33d65c07 addtional output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11408 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-24 20:10:15 +00:00
bp-sawyers e70138abfd Update version of 2.6 branch to 2.6.11
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11405 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-23 19:49:53 +00:00
bp-sawyers b7e5ba9099 Backport makerpm script to 2.6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11403 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-23 18:40:17 +00:00
bp-sawyers 467b5a4177 Backport new build process from trunk to 2.6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11401 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-23 14:59:45 +00:00
bp-sawyers e7263f60a8 Interim update to 2.6 build script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11400 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-23 14:51:00 +00:00
wanghuaz f1a69b02c8 Fixing defect 3469377: confighfi shouldn't configure 4 hfi interfaces only
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11351 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-05 05:49:16 +00:00
amy0701 dce9d70b14 rm lsvm for testcase
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11349 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-05 05:19:31 +00:00
wanghuaz 4830f1704f Fixing defect 3469422: confighfi cannot reset the running hfx interfaces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11346 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-05 03:29:19 +00:00
jjhua c12b3fee86 output the log directory when firmware update on BPA
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11345 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-01-05 03:00:22 +00:00
jjhua 55e0df750d syspowerinterval for powering on CECs within one frame. If there is just a sleep , it will be interrupted bye the child's signal. So enhance it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11320 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-30 09:03:16 +00:00
daniceexi 4e2919cbab add try for the syncfiles postscript
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11314 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-29 10:32:29 +00:00
yinle b5780548f0 Fix bug :3466290 lsslp -m -i plugin error
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11308 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-28 06:22:57 +00:00
amy0701 9f8293200e update
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11260 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-16 08:52:55 +00:00
amy0701 99886eb792 update aix_full_installation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11259 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-16 07:47:52 +00:00
amy0701 c2621cd941 update aix_statelite_installation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11256 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-16 07:19:35 +00:00
lissav 4174cbdd65 fix defect 3460126 changes permission on /install/postscripts to 0700
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11254 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-15 18:59:47 +00:00
nott cc2c6a2d80 fix getopt call
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11244 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-14 15:32:13 +00:00
lissav cdb0d7a683 fix defect 3459192 xcatdb has to be restarted if database goes down
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11243 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-14 13:16:25 +00:00
nott 3482e6ca92 switch prsync to rsync
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11237 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 19:34:09 +00:00
nott 7f0303661f fix --liteonly option
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11235 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 15:57:18 +00:00
wanghuaz 4156f7e7de Fixing bug 3458924: ilitefile is different with litetree/liteimg that there is no noderange in its option. Still checking if the req->{node} should not be used here.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11233 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 09:18:12 +00:00
wanghuaz a0e0692fa5 Fixing bug 3458863: removed unnecessary and having issue codes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11232 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 09:05:25 +00:00
zhaoertao 8061e280dc fix bug 3458567: lsvm NODE -l not display huge_page information
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11230 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 08:20:10 +00:00
amy0701 2dcf6750fc update for aix_diskless_installation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11229 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 08:00:28 +00:00
jjhua b1d4dc5613 fixed defect 3458235, get_compatible_version_from_rpm also will check the directory of the firmware files
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11226 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 07:17:12 +00:00
jjhua 1bf336a3f8 fixed defect 3458235, get_compatible_version_from_rpm also will check the directory of the firmware files
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11225 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 07:13:43 +00:00
amy0701 4364be67fc update
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11224 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 06:49:58 +00:00
amy0701 32e831629c update for makenetworks
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11223 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 06:30:07 +00:00
zhaoertao 9714883f52 fix bug 3458828: rscan has error massege if no user and passwd.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11222 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-13 06:25:14 +00:00
lissav e74f245b7b fix broken line
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11219 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-12 20:02:44 +00:00
lissav 800fd64640 fix for defect 3458311
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11216 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-12 19:48:04 +00:00
lissav 0a774aea20 Solves hang running xcatcmds from MN to SN using ssh
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11214 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-12 16:19:14 +00:00
bp-sawyers 09a3a51b06 Add new cons/ivm script to 2.6 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11209 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-12 12:07:33 +00:00
zhaoertao 04fd13af5b fix bug 3454934: The issue that Manually Creating HMC Entry with mkdef Without Specifying Userid and Password
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11207 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-12 03:08:10 +00:00
jjhua 41b6208cdf fixed the logic when get accounts from ppcdirect or ppchcp tables; supports groups such as cec,hmc,fsp...
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11195 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-09 05:15:48 +00:00
daniceexi 22238d9d84 Using the special ivm console script to instead of the common one with hmc
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11194 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-09 01:07:49 +00:00
nott 81bd2a5861 add -l option and statelite sync support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11193 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 19:19:41 +00:00
nott 5a8216703b add -l option and statelite sync support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11192 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 18:47:54 +00:00
nott 957bc41fb3 add statelite sync for AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11191 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 18:43:54 +00:00
daniceexi 812051a434 more fix for replacing the getAttribs with getNodeAttribs for regular expression support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11189 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 14:57:07 +00:00
daniceexi b6abb7075a replace the getAttribs with getNodeAttribs for regular expression support
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11188 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 13:59:04 +00:00
lissav 6eedeebc77 add comment need regx where we haev not fixed the code
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11186 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 12:27:20 +00:00
lissav bb31105e70 add comment need regx where we haev not fixed the code
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11185 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 12:16:04 +00:00
jjhua f33baa6aba use getNodeAttribs instead of getAttribs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11183 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 09:00:21 +00:00
jjhua 488140a428 use getNodeAttribs instead of getAttribs for vmmaster table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11182 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 08:31:33 +00:00
jjhua 999ffe2823 use getNodeAttribs instead of getAttribs for ppc table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11178 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 08:11:38 +00:00
jjhua f7e3cff5f0 use getNodeAttribs instead of getAttribs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11176 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 08:07:56 +00:00
jjhua 988e00d1d6 use getNodeAttribs instead of getAttribs for ppc table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11174 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 07:49:19 +00:00
yinle 0f0723592d Remove getAttribs from lsslp.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11172 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 06:28:00 +00:00
jjhua fd18ee0166 change getAttribs to getNodeAttribs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11169 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-08 06:23:24 +00:00
lissav 9fe321a9ba change getAttribs to getNodeAttribs, the code does not handle regx in the PPC table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11164 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 16:52:52 +00:00
yinle 39e1cd10e2 Fix the mistake that lsslp can't write hmc's mtms
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11163 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 10:30:55 +00:00
yinle 953a306215 Fix the mistake that lsslp can't get hmc's mtms
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11160 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 10:26:57 +00:00
yinle 658c4af9fe minor fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11159 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 10:21:04 +00:00
jjhua e3145dcb40 change the output messages when the powerinterval value is invalid
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11152 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 08:09:41 +00:00
jjhua e2adff9290 pass the powerinterval into fsp-api with on/reset actions
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11148 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 07:51:57 +00:00
yinle a7ab35be04 Modify the description about -M
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11147 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 07:49:40 +00:00
wanghuaz 2b938be82e RHEL6.2 support on system p
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11145 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 07:44:06 +00:00
amy0701 d14e8a3422 update bat.bundle adding packimage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11144 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 07:08:24 +00:00
amy0701 02aad8040b add testcases for packimage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11143 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-07 07:04:25 +00:00
lissav 2e68e00d73 add ~.xcat directory to the snap
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11138 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-06 14:54:29 +00:00
jjhua 1048917a8b add the bc.ppc64 into the pkglist -- for bootlist
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11134 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-06 08:12:15 +00:00
amy0701 27359e6c08 update sleep time for aix diskless
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11132 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-06 06:51:15 +00:00
yinle cba5bd906f Fix bug 3451003:xcatsetup can't work with some kinds of host-name
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11125 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-05 14:30:50 +00:00
wanghuaz 6af4dc1f7d Fixed the issue that bootlist cannot set hfx as boot device. on AIX, we need to use hfix instead of hfx as boot device, same way with ethernet.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11123 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-05 08:07:32 +00:00
yinle 06618ddd32 Fix bug 3445173 : xcatsetup give the wrong id for lpars, adjust the way of calculating node id.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11120 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-05 02:48:32 +00:00
lissav 03e45369f3 fix defect 3448413
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11118 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-02 17:18:58 +00:00
amy0701 b491d913c1 update bat.bundle
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11113 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-02 06:42:51 +00:00
amy0701 97a17e00d3 update testcase
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11110 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-02 06:19:16 +00:00
zhaoertao 2d1ce8d415 some english corrections for man page of mkhwconn
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11108 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-02 01:36:21 +00:00
lissav 4eb1d5571d fix info
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11106 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-01 14:28:35 +00:00
lissav 7f92ce0444 add support for binary dump of DB2 database
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11104 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-01 14:09:12 +00:00
lissav 3435d76f5e add support for binary dump of DB2 database
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11103 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-01 14:08:05 +00:00
zhaoertao 4be064b4cf update man pages for service vlan redundancy item
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11102 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-01 09:42:56 +00:00
daniceexi 127d916d34 defect 3441169: Using the rc.statelite.ppc.redhat to replace rc.statelite for rh5,6 ppc64
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11096 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-12-01 01:39:12 +00:00
lissav de6647147c Enhance cfm2xcat man page
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11081 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-30 11:46:14 +00:00
zhaoertao 1c1618d2fc Service vlan redundancy support item
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11079 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-30 09:53:46 +00:00
jjhua 8e34820345 initialize the powerinterval and syspowerinterval in the site table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11076 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-30 08:29:26 +00:00
jjhua 8e81adb305 performace enhancement for rpower on/off. power on/off the lpars within one CEC using only one fsp-api
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11071 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-30 08:16:06 +00:00
jjhua 047e57f0c3 add the syspowerinterval description
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11070 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-30 08:12:33 +00:00
jjhua 76223558ac add the syspowerinterval to control the CECs in one Frame boot up speed
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11069 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-30 08:08:54 +00:00
nott f7daa1c360 remove bogus error message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11066 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-29 15:42:21 +00:00
bp-sawyers db165108ea Have xCATsn require ipmitool-xcat instead of ipmitool
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11064 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-29 14:40:36 +00:00
jjhua 7609407917 If the mtms becomes ####*###, the lshwconn will not work well. enhance it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11063 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-29 06:23:07 +00:00
jjhua 8d565d3918 make the dfm log message only if they are using DFM
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11061 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-29 05:17:59 +00:00
lissav 688e64e722 Change call to getAllNodeAttribs to support reg expression in nodetype table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11058 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-28 17:31:13 +00:00
jjhua 505a0aae73 check the bpa firmware level before updating the CEC's firmware
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11054 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-28 10:18:07 +00:00
jjhua b1946e3f5c add the message before starting rflash: If you use Direct FSP/BPA management(DFM) to do the firmware update, You can find the log files in the /var/log/xcatd/dfm/rflash/.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11053 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-28 10:16:43 +00:00
zhaoertao 236b498fff fix bug 3412808: mkhwconn need do option check
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11051 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-28 05:59:45 +00:00
zhaoertao a9a7703ed5 add Huge Page Memory supporting item
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11048 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-24 09:24:24 +00:00
amy0701 3fcd955af8 update xcattest
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11046 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-24 02:16:37 +00:00
bp-sawyers 5862e96f9d Change require to ipmitool-xcat in 2.6 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11037 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-23 13:40:05 +00:00
jjhua 5c1f289122 update the information of the ppcmaxp, maxssh and powerinterval for the site table in Schema.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11028 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-18 06:20:44 +00:00
nott 7481889d00 fix mkdsklsnode -n option
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11022 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-16 19:32:12 +00:00
bp-sawyers 2ae9e0c922 Update the 2.6 branch version to 2.6.10
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11020 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 17:38:11 +00:00
lissav 2fa947cd0c perf improvement to getnodetype, getcecchildren, getchildren
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11017 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 12:26:25 +00:00
lissav 03db3ab47f do not dump/restore isnm_perf* tables
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11016 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 12:18:45 +00:00
lissav 7c5c6e163c update man page for no longer dumping/restoring isnm tables
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11015 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 12:17:00 +00:00
amy0701 a176c60048 update makedhcp testcases
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11012 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 07:19:15 +00:00
amy0701 ccc22e145b update testcase for copycds
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11011 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 07:17:35 +00:00
amy0701 6bd1af764b update
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11010 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 07:15:56 +00:00
amy0701 0f84dd880a update bat.bundle
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11009 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-15 07:14:40 +00:00
lissav 8f48a9539c one more change
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10993 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-11 17:16:16 +00:00
lissav 3ffc0b2437 performance improvement to getchildren, ok'd by Bruce for 2.6.9 if we rebuild
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10992 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-11 16:53:39 +00:00
jjhua db4d3824ed fixed the bug 3428290, it has been created in another situation.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10986 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-09 09:31:00 +00:00
wanghuaz d47cca6d30 Correct one typo to adjust the order to remove paging device and ODM configuration
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10984 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-09 07:56:49 +00:00
wanghuaz fc5c20ae0d Fixed the issue that multiple mkdsklsnode will add duplicated lines in rc.dd_boot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10982 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-09 04:59:48 +00:00
wanghuaz 708e5f143e Fixed the paging space missing issue on large clusters
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10981 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-09 02:44:13 +00:00
lissav ec81ac9aa0 fix performance issue with getNodeIPaddress, the problem is in DBobjUtils->getchildren, but this routine never should have called DBobjUtils->getchildren.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10972 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-04 18:04:27 +00:00
lissav 3b0783e351 Do not put xcatd in /etc/inittab on Update call, breaks HAMS
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10966 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-03 19:14:38 +00:00
jbjohnso 82cce879ce Increase timeout for AMM operations in general, but particularly lengthen it for queries involving LEDs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10960 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-02 20:41:20 +00:00
bp-sawyers 3b6e0db8f4 Fixed serveral problems in configeth script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10955 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-01 20:28:01 +00:00
jjhua b963bc7ec4 fixed bug 3428290 in sf.net, in DFM, if no hfi or net, output the error with usage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10942 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-01 03:16:25 +00:00
wanghuaz 8a7458234d Create the tmp file to ramdisk instead of NFS folder to avoid NFS issues during bringup paging space
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10939 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-01 02:26:59 +00:00
jjhua 0b7ea33179 the 0x02 is used with Chip Pump Mode which is not used by customers. So I change the default value of Memory Interleaving to 1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10938 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-01 02:20:43 +00:00
jjhua d76099720d And the 0x02 is used with Chip Pump Mode which is not used by customers. So I change the default value of Memory Interleaving to 1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10936 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-11-01 01:58:48 +00:00
lissav b37de511a8 Add what to change in the script to comments and add error processing defect 3430879
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10934 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-31 19:52:22 +00:00
lissav 1ed591ef0c fix link to dracut files, 3411554,3431076,3398255
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10931 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-31 17:42:48 +00:00
wanghuaz eadb53665c Removed the check of pping/ppping -i option when trying to remove the 'hfx' postfix in hostname, since in power 775 cluster, it is also possible to check ethernet connections with -i enx.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10930 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-31 11:04:34 +00:00
wanghuaz 25d5e487ec Fixed the issue that confighfi doesn't configure ml0 correctly on Torrent 2.1 and configeth doesn't configure ethernet in power 775 clusters
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10927 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-31 10:19:37 +00:00
wanghuaz fd454d7ff2 Make ppping -i option support hfi interfaces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10923 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-30 08:59:44 +00:00
wanghuaz d7ae87e7ba Make pping -i option support hfi interfaces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10921 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-30 08:08:31 +00:00
wanghuaz 4a42452208 Added powerinterval support in 2.6 stream
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10919 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-30 06:07:17 +00:00
nott a40afdef5e make sure niminfo is valid for xcatinfo
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10918 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-28 20:33:16 +00:00
amy0701 ae63258e0f add litefile.csv for linux_statelite_installation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10914 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-28 08:05:51 +00:00
amy0701 687f289b78 add linux_statelite_installation
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10913 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-28 08:04:27 +00:00
jjhua d097aa1deb rflash supports hierachy in AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10910 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-28 06:10:25 +00:00
amy0701 15f85d6303 add aix_statelite_installation testcase
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10909 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-28 05:54:59 +00:00
amy0701 985f747691 update makenetworks testcases
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10908 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-28 05:46:00 +00:00
lissav c1ec0439b8 add lsxcatd -a
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10901 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-26 15:54:30 +00:00
lissav 8d6a163f5a dump last two days of auditlog and eventlog
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10899 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-26 15:33:11 +00:00
zhaoertao 5f8243a389 fix bug 3428569: No LPAR ID given error on AIX71 EMS
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10895 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-26 04:46:40 +00:00
lissav 3cc995c63b Do not snap ISNM tables except config, too big
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10891 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-25 16:58:42 +00:00
lissav b8b5793bf4 Some enhancements. use strict added, fixed uninitialized variable
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10888 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-25 16:08:07 +00:00
lissav c947fa575f add support for XCAT_SKIPTABLES env variable
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10882 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-25 13:25:36 +00:00
lissav ac6b203ea8 add support for Env variable to determine skiptables
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10880 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-25 12:55:40 +00:00
jjhua 2c912a6efa fixed bug 3413154.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10878 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-25 08:00:34 +00:00
jjhua 2a295edea8 QDR IB support on rhels6.1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10876 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-25 05:16:29 +00:00
nott 429a5b9076 get node hosts file from spot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10873 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-24 17:49:53 +00:00
nott 571497b51c set up disk mirroring
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10872 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-24 16:27:37 +00:00
daniceexi 56ef49030a defect 3427738: fixed a typo in the otherpkgs.pkglist for rh6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10864 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-24 10:01:53 +00:00
jjhua 73c38b5152 configure the IPs for QDR IB on rhels6.1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10861 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-24 07:00:41 +00:00
yinle 3295f11ac4 Fix mistake that lsslp will match the wrong definition.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10856 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-23 09:28:59 +00:00
yinle 5cb12eb3e7 Fix bug 3426844: lsslp set incorrect parent values
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-21 15:12:16 +00:00
nott 19b42174bf fix typo
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10853 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-20 19:01:12 +00:00
jjhua f25f6022fb add Memory Interleaving Mode value and the Pump Mode value
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10850 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-20 06:18:35 +00:00
jjhua a5fa89aef2 keep the value of memory interleaving coherence, use 1 and 2 instead of interleaved and non-interleaved
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10849 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-20 05:54:38 +00:00
jjhua 640a5b5575 keep the value of memory interleaving coherence, use 1 and 2 instead of interleaved and non-interleaved
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10847 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-20 05:49:33 +00:00
zhaoertao d03e51ed9e update lsvm to show BSR informations
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10846 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-20 05:43:04 +00:00
zhaoertao 6c6e4bd724 fix bug item 3425252: rspconfig NODE BSR warning mesg improvement
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10844 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-20 03:27:28 +00:00
yinle 5949528172 Fix bug 3425775:lsslp plugin bug /opt/xcat/lib/perl/xCAT/NetworkUtils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10839 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-19 09:04:41 +00:00
yinle 9770e640d3 Fix bug 3425775: lsslp plugin bug /opt/xcat/lib/perl/xCAT/NetworkUtils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10838 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-19 09:00:31 +00:00
jjhua e9cc31faae remove the from the get_ServiceNode() which was added by me
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10836 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-19 05:35:41 +00:00
jjhua 280eae743e in DFM hierarchical cluster, mkhwconn/lshwconn/rmhwconn with -T fnm will send the command to CEC/Frame direclty, not through the service node if specified.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10835 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-19 05:29:40 +00:00
wanghuaz fbfac9405b adding sles10 sp4 support in 2.6 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10832 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-19 03:05:25 +00:00
nott 9d413508e6 avoid dup network def error
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10829 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 16:27:49 +00:00
ligc b2b48b7678 fix for bug 3424615: put xcat PATH,MANPATH ahead of OS ones
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10824 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 08:52:29 +00:00
ligc 4d5d0964d7 fix for bug 3424615: put xcat PATH,MANPATH ahead of OS ones
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10821 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 08:38:28 +00:00
yinle eafd4a7eff Add a new subroutine, finding the ip and the nic's mapping.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10819 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 06:31:11 +00:00
yinle 987ca7033a Fix bug 3409378 lsslp return multi-IP address of HMC; 3412259 lsslp couldn't get parent for some cecs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10817 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 06:11:02 +00:00
ellen56 ee9e20cf9f fix defect 3423405
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10816 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 06:06:24 +00:00
jjhua 93b9be9b49 fixed the uninitialized error in get_ServiceNode()
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10814 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 03:27:24 +00:00
wanghuaz d3d9348e74 give execution permission to postinstall scripts for sles
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10811 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 02:38:11 +00:00
sjing eec0b38a2d The new_install script only prompts 1 time.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10806 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-18 01:22:29 +00:00
wanghuaz 4d944e385a Fixed one problem in nimnodeset that if SN doesnt have nim master setup, nimnodeset cannot read all the NIM resouce types and this leads to several unpected errors. Putting the NIM resource reading code right after nim_master_setup.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10800 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 16:00:36 +00:00
wanghuaz 1d20428352 Creating node definitions in nimnodeset, instead of xcat2nim. currently xcat2nim doesn't support HFI and also doesn't support to create networks on SNs correctly, it will be a question of how to create networks on SNs. So for now, we will use nimnodeset to create nim clients on SNs.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10795 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 13:52:08 +00:00
wanghuaz 6ae6ff3ec4 Remove the mknimimage -u limtion for diskful images. This is to allow diskful installation over HFI.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10790 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 09:28:26 +00:00
zhaoertao ade3d19a46 add option '-x' to output the information of deconfigured resources in XML format
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10788 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 06:03:48 +00:00
zhaoertao a3d37933ea update BSR,failover part
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10787 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 05:59:42 +00:00
zhaoertao 3e6626f22d add BSR, failover item
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10786 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 05:54:07 +00:00
sjing 1eaef84651 to support the upc compliers
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10784 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-17 02:03:36 +00:00
ellen56 ffe63be973 Add ENV support for xcat otherpkgs.pkglist/pkglist
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-14 07:07:28 +00:00
jjhua 5b1f6fd4da in DFM hierarchical cluster, mkhwconn/lshwconn/rmhwconn with -T fnm will send the command to CEC/Frame direclty, not through the service node if specified.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10775 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-14 05:33:09 +00:00
jjhua 41860799c5 in DFM hierarchical cluster, mkhwconn/lshwconn/rmhwconn with -T fnm will send the command to CEC/Frame direclty, not through the service node if specified.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10774 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-14 05:29:26 +00:00
jjhua 7ca22d39ac in DFM hierarchical cluster, mkhwconn/lshwconn/rmhwconn with -T fnm will send the command to CEC/Frame direclty, not through the service node if specified.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10773 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-14 05:27:39 +00:00
yinle 8ac9b36562 Fix bug 3392830:"rscan -w" modify the HMC nodetype->getmacs will fail
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10772 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-14 02:35:06 +00:00
daniceexi 949b4cb086 code drop for fedora15 support. Support the systemd and dracut 009
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10763 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-13 13:12:54 +00:00
lissav b1c534716b fix perl error because of conflicting close function
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10746 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-11 18:42:22 +00:00
ligc ba190e0d9d fix for bug 3421484: redirect ps to handle basecust perminent
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10739 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-11 08:37:25 +00:00
yinle 7e2ff0f420 Modify the description of the fsp/bpa ip address.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10722 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-09 02:55:20 +00:00
ligc 122240358e update makenetworks test case
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10721 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-09 01:41:10 +00:00
ligc d828446fd0 add node number information for mkdef,chdef,rmdef output message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10718 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-09 01:39:20 +00:00
ligc 2dafc29fa5 fix for bug 3406673: change PATH and MANPATH to make xcat ones before OS settings
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10716 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-09 00:50:01 +00:00
ligc 9579b25806 fix for bug 3413432: conserver trust all ip addresses configured on local node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10715 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-09 00:34:54 +00:00
bp-sawyers 24b7e62a4b Checked in fix by xiao peng for bug 3414725 - diskless root directory has bad fileperms
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10697 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-04 18:08:53 +00:00
lissav 5a0835c89e fix getHomeDir so it can find the home directory even if the id is not in /etc/passwd (for example in LDAP)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10693 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-03 19:10:38 +00:00
lissav 96fa0f6471 go with nimprime for the attribute not case
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10689 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-02 10:34:54 +00:00
lissav 3270774658 fixes for defects 3415106,3414742
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10688 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-10-02 10:26:47 +00:00
bp-sawyers 3c8ad67b4a Update version to 2.6.9
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10687 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-30 18:33:20 +00:00
lissav 690b79a46e fix bad message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10654 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-28 11:25:23 +00:00
jbjohnso 2048d4cbd2 Backport fix for large dhcp6config files
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10649 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-27 15:31:12 +00:00
linggao 63c23b6d20 fix error for SLES 11 genimage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10640 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-26 17:59:43 +00:00
lissav 7031fa292b change print to echo
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10631 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-24 12:06:10 +00:00
lissav 5ff6f58072 fix perl syntax error with mixed clusters, see defect 3413295
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10624 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-23 12:44:52 +00:00
lissav ab282e95dc more info
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10622 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-23 10:45:08 +00:00
lissav 78d63831b1 fix syntax
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10612 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-22 19:11:53 +00:00
lissav c2642732c6 fix format
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10611 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-22 18:49:55 +00:00
lissav 5fd64b4e8a xcatdebug manpage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10608 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-22 18:22:53 +00:00
lissav 158a08f288 support for xcatd trace
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10604 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-22 14:33:08 +00:00
lissav e2a44d1668 Support xcatd trace facility
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10603 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-22 14:21:19 +00:00
yinle f6295148e3 Fix bug 3412161,xcatsetup: parent attribute for fsp and bpa is not set
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10601 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-22 00:51:56 +00:00
ligc 7d850a4889 add service.raid1.sles11.tmpl and post.sles11.raid1 for RAID1 support on SLES11
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10577 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-21 03:14:12 +00:00
nott eae067c880 skip 2nd resolv_conf in bos_inst
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10571 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-20 14:31:30 +00:00
lissav 323fba6ed3 change comment on nfsserver to cover both NFS and HTTP
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10569 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-20 13:51:41 +00:00
yinle 3576b6edc5 Fix bug 3411406:xcatsetup: FSP side is not set correctly
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10563 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-20 05:42:54 +00:00
linggao 2911e9cb3a make sure osimage.provmethod=statelite when calling liteimg command, defect 3409362
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10561 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-19 21:05:28 +00:00
linggao 4838a4201d support for multiple mac addresses for composing nodeid for RMC, defect 3410319
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10555 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-19 20:31:15 +00:00
jjhua 230ce41127 Proposal from defect SW098533,the header is confusing and there should not be any data returned when there is no gard records
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10551 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-19 10:18:53 +00:00
nott e677086adc set up resolv.conf on backup SN
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10540 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-16 19:30:56 +00:00
lissav 96d7905028 man page tabprune -d
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10526 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-14 14:02:34 +00:00
lissav 1a8c473ea4 add tabprune # days, need to test on other databases and man page
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10523 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-14 11:10:35 +00:00
zhaoertao c900ba7990 fix bug 3301782: cancelling hdw_svr commands doesn't kill the fsp-api
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10518 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-14 04:28:53 +00:00
linggao 05d60f28d3 updated genimage man page, defect 3408401
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10515 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-13 19:54:51 +00:00
bp-sawyers 5b95434d07 update 2.6 branch version to 2.6.8
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10507 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-13 12:31:41 +00:00
ligc 14a851b129 fix for bug 3391271: add dns forwarder into /var/named/db.cache to support dns forwarder on AIX
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10504 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-13 02:29:05 +00:00
yinle 85a375d689 fix some minor mistakes.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10503 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-13 00:31:18 +00:00
nott b592346b68 fix missing resolv_conf
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10500 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-12 18:04:55 +00:00
linggao 29da171a6e minor fix an error message in route.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10495 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-12 15:09:07 +00:00
bp-sawyers d73267e16b Fix promote prega problem in build script in 2.6 branch also
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10486 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-09 12:50:13 +00:00
yinle 8034d25628 minor fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10485 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-09 08:23:37 +00:00
jjhua 2d6e10f185 correct some improper information
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10481 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-09 05:33:48 +00:00
lissav 776a4347c2 add policy table examples
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10473 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-08 13:04:49 +00:00
mellor 9e5ed72181 defect 3396907 - added new reconfiglist keyword to send LL reconfig cmd to specified nodes, e.g. submit-only nodes such as login nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10467 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-07 17:09:38 +00:00
lissav 6fa8c670cc man page for tabch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10466 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-07 15:44:51 +00:00
lissav 13f7057ab8 enable tabch plugin
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10465 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-07 15:43:28 +00:00
lissav 545586453e enable tabch plugin
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10464 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-07 15:35:38 +00:00
mellor 52c78e8ef0 defect 3405123 - rollupdate change LL feature for down nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10460 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-07 14:12:53 +00:00
zhaoertao f508e8d4a7 delete the 'BSR' item based on the lastest revision
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10458 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-07 06:45:49 +00:00
lissav 80a4209a56 bad example
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10452 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-06 17:50:41 +00:00
lissav e140c6ecea change example, rsh/rcp not supported
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10450 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-06 17:04:39 +00:00
wanghuaz 185799c4af Fixed one issue that there will be an error in mkdsklsnode if nfsserver is set on AIX. This is introduced by the enabling /proc filesystem for diskless node, it is not required to check nfsserver
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10445 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-06 11:08:47 +00:00
yinle 3d34490024 Add new features' descriptions to xcatsetup of supporting fsp/bpa's name of vlanid.frameid.cecid.1/2 and lpar names of hostname[01,05,09,13,17,21,25,29]. Fix bugs 3392389 xcatsetup to support BPA name using Frame nd Cec,3388654 xcatsetup/lsslp autoconfiguration does not work,3385836 xcatsetup gives invalid message but creates nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10440 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-04 07:48:24 +00:00
mellor 46719cea07 refix defect 3377019: someone overwrote my change to Utils.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10437 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-02 15:35:33 +00:00
daniceexi a08819d0d1 Updated the download location of xCAT-pEnergy
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10433 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-02 07:42:03 +00:00
linggao f0ed81dd29 merged some fixes from trunk to here
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10432 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 20:35:08 +00:00
lissav 2645befb3a remove rc.db2 setup does not work
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10430 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 11:29:41 +00:00
zhaoertao 24e52f96fe update 'rspconfig' manpage for 'BSR' item
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10428 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 06:54:44 +00:00
zhaoertao 878cd33a3b BSR item and modifications for 'rspconfig' options that use 'ASMI'
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10426 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 05:54:53 +00:00
jjhua 1eef8bfb09 fixed bug 3394561, --resetnet option for Direct BPA/FSP
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10425 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 05:50:12 +00:00
jjhua 41e579fcd1 fixed bug 3393278, for rflash, if node node/noderange specified, the noderange will be set to the <dir>. add one condition
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10424 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 05:28:27 +00:00
jjhua b4d4194323 fixed defect 3392334, give warning message when there is no deconfigured resouce.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10423 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-09-01 03:23:24 +00:00
mellor ffef2c42d0 rollupdate defect 3396903: need to run llctl reconfig on MN with latest LL ptf1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10411 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-31 13:20:23 +00:00
mellor 38cc43836c use getNodeAttribs instead of getAttribs for statelite.mntopts to handle nodegroups in statelite.node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10410 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-31 13:02:11 +00:00
mellor 5236326c33 added include_file subroutine to statelite.pm copied from packimage.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10407 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-31 12:09:25 +00:00
lissav cad30f609e fix defect 3372805
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10406 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-31 11:55:57 +00:00
wanghuaz b1d341a332 Code enhancement for mac address failover
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10404 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-31 10:19:58 +00:00
lissav deae2fdf1e update with fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10400 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-30 15:57:01 +00:00
yinle 862fd2d095 Add new features to xcatsetup to support fsp/bpa's name of vlanid.frameid.cecid.1/2 and lpar names of hostname[01,05,09,13,17,21,25,29]. Fix bugs 3392389 xcatsetup to support BPA name using Frame nd Cec,3388654 xcatsetup/lsslp autoconfiguration does not work,3385836 xcatsetup gives invalid message but creates nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10398 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-30 13:22:13 +00:00
wanghuaz 3e77b5f7c1 Fixed one timing issue that in open firmware 'Select this console as the active console press 0' msg passed quite quickly and this makes lpar_netboot.expect messed up with next msg after it. Adjust expect cases to put 'ok(.*)0 >' as a highest priority than (.*)elect this consol(.*)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10396 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-30 12:50:09 +00:00
wanghuaz e3bde1a271 Added /proc filssytem for diskless node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10395 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-30 12:32:31 +00:00
wanghuaz a23a2096a5 Fixed one issue that in the case of first boot try failed, and second boot try succeed, rnetboot still returns the first try's error. If second try succeed, it means rnetboot succeed, it should return success.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10394 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-30 12:21:48 +00:00
lissav adcde47e22 Code to improve for clean shutdown of daemon
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10392 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-30 11:47:09 +00:00
lissav 2bd5a23a20 fix disjointdhcp definition
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10390 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 18:27:39 +00:00
lissav 765c20d6de fix for defect 3394065
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10388 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 15:37:52 +00:00
lissav 112ac2b7cc fix for defect 3392944 check database not under /install
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10387 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 15:35:27 +00:00
lissav 443115c63c fix for defect 3392944 check database not under /install
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10386 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 15:33:56 +00:00
lissav 4e5b13bbea fix for defect 3393849
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10385 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 15:30:34 +00:00
lissav 83815d4147 fix defect 3396951 Hitachi group not preserved on rsync
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10384 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 13:54:30 +00:00
lissav cf08fd0f66 fix defect 3396951 Hitachi group not preserved on rsync
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10383 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 13:50:39 +00:00
lissav ff0a87d351 fix defect 3389420 recursive rsync not working for xdcp to image
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10382 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 13:46:24 +00:00
sjing 5610770c7e Hitachi PMR fix - swapnfs is not available when paging resource is changed.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10380 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 03:04:33 +00:00
sjing 1687f84f1a Hitachi PMR fix - swapnfs is not available when paging resource is changed.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10379 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 02:58:10 +00:00
sjing 7594e9d636 Hitachi PMR fix - swapnfs is not available when paging resource is changed.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10378 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-29 02:55:52 +00:00
lissav ffc13f8709 change from runcmd_S call to runcmd (streaming)
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10377 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-28 09:30:15 +00:00
lissav 19fd5997b2 rm runcmd_S merge into runcmd
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10376 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-28 09:26:04 +00:00
bp-sawyers 43f8d9907a Updated 2.6 branch version to 2.6.7
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10371 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-25 19:55:21 +00:00
jbjohnso f01980896c backport recognition of manually extracted esxi4.1 images
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10308 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-17 19:08:21 +00:00
jbjohnso 0e6c65680e Backport esx locking
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10307 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-17 19:07:46 +00:00
jbjohnso 0c5df40c81 Backport datastore automount opt-out
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10306 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-17 19:06:49 +00:00
zhaoertao cea06ec458 fix bug 3390625, delete check option -m for 'set_lpar_name'
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10291 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-16 04:07:28 +00:00
sjing 7f109189f7 The user provided fix for makedns issue of domain without dots, introduced new bug.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10281 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-12 11:23:59 +00:00
zhaoertao 08d6ccb1e4 fix bugs 3389970, not define 'output'
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10279 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-12 08:16:41 +00:00
daniceexi ccf2f55f83 add a black line to make the rpm of xCAT-test can be done automatically
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10278 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-12 06:21:11 +00:00
jjhua 0072906ad2 fixed bug 3390281, some of the GARDUNIT tags has two entries in [], enhaced it.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10276 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-12 03:41:50 +00:00
lissav 59702b7ed8 fix defect 3384108
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10273 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-11 19:28:07 +00:00
zhaoertao 9e58da04bb fix bugs 3389970, rpower give fsp plugin bug message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10270 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-11 10:48:37 +00:00
mellor 1b9d15b143 defect 3388864 - rollupdate - cancel LL reservation if bad appstatus
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10266 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 22:03:18 +00:00
mellor 66edd2ec5a HPC Integration - fixed yum prompt in gpfs_updates script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10264 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 16:51:12 +00:00
jjhua 173f8ce7e2 add some description of -d <data_directory> into the manpage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10261 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 08:52:34 +00:00
jjhua 4ef818ba79 fix xcat-Bugs-3386437, add -d <data_directory> for rflash to do firmware udpate
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10260 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 08:49:36 +00:00
wanghuaz dde8390522 Fixed bug 3373496 that imgimport created two levels of rootimg
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10259 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 08:13:15 +00:00
daniceexi ea2c6f1303 defect 3189574: replace all the keyword myipfn in the kcmdline attribute
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10255 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 07:26:28 +00:00
wanghuaz b12793213e Fixed the issue that setbootfromdisk cannot handle the multipath without raid.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10253 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-10 05:29:27 +00:00
lissav e1fc3ca4cd add check for search site.domain in /etc/resolv.conf
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10250 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-09 16:35:56 +00:00
lissav 65e8976a73 change nofiles limit
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10248 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-09 12:50:59 +00:00
sjing 6d113545a2 Fixed the makedns issue for domain without dots.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10245 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-09 07:36:18 +00:00
nott d4f4a6a5b5 add check for node name res
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10244 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-08 17:23:45 +00:00
bp-sawyers 531a326e7c Test commit for new 2.6 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10241 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-07 12:38:29 +00:00
bp-sawyers 3f452f17b7 A https://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/branches/2.6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10240 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-07 12:24:28 +00:00
lissav d719b98879 update version to 2.6.3
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10211 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-02 15:21:09 +00:00
phamt 789dbbe9f4 Synched xCAT-UI 2.6 branch with trunk.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10202 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-08-01 15:17:34 +00:00
daniceexi 60eba22531 defect 3373326: display a message and continue if no repository was created in the kerneldir
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10190 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-29 06:37:50 +00:00
phamt e1857b577f Synched xCAT-UI 2.6 branch with trunk.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10177 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-27 20:29:31 +00:00
phamt 2a4aa6a4b7 Synched xCAT-UI 2.6 branch with trunk.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10176 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-27 20:29:00 +00:00
phamt f40ed8bd74 Synched xCAT-UI 2.6 branch with trunk.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10175 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-27 20:25:23 +00:00
lissav 206c2b4a30 remove ddns message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10172 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-27 10:58:29 +00:00
sjing dc088cf05b Fix for the issue - makedns with no flag does not work.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10159 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-27 05:16:26 +00:00
lissav 81de935353 fix for defect 368099
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10109 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-18 15:46:31 +00:00
sjing 4f38ce60a7 exclude the nodes not belong to any nets defined in networks table, and add some messages which is useful in scaling cluster.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10094 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-15 07:02:46 +00:00
jbjohnso 209b47fe3e Add KVM package list for CentOS6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10067 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-12 20:31:18 +00:00
jbjohnso 7184c5f1d1 Add CentOS6 package list
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10065 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-12 20:28:26 +00:00
jbjohnso bf6fcac20b CentOS 6 templates added
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10063 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-12 20:25:31 +00:00
jbjohnso 011fe6608a Support CentOS 6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10061 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-12 20:19:43 +00:00
jbjohnso 4c2b78a22d Fix nodestat without arguments problem
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10058 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-12 12:58:13 +00:00
jbjohnso ba1a1670ec Update manpage to reflect -f option in nodestat
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@10027 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-07-06 17:19:49 +00:00
jbjohnso 4f91584ed9 Backport nodestat feature from trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9982 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-29 12:08:07 +00:00
daniceexi 55c4f81af6 Fix the issue that genimage has typo in mount -o option
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9969 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-28 07:50:03 +00:00
daniceexi d653f89e87 The continued fix for the defect 3317678
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9968 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-28 07:44:54 +00:00
lissav b269c14828 up to 2.6.2
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9953 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-27 14:53:50 +00:00
jbjohnso 51ec31d4d9 Backport fix for rmigrate -f error reporting
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9936 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-24 18:36:49 +00:00
jbjohnso 8216370a21 Backport fix for rmigrate -f with vmware
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9902 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 20:09:01 +00:00
lissav a534181da3 fix for defect 3324448, remove pmr fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9886 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 14:23:08 +00:00
lissav 31122369a7 fix for defect 3324448, remove pmr fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9885 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 14:15:30 +00:00
lissav a707c8a9b9 fix for defect 3324448, remove pmr fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9884 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 14:08:34 +00:00
lissav 404f554a99 fix for defect 3324448, remove pmr fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9883 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 14:07:07 +00:00
lissav fa0992ea09 fix for defect 3324448, remove pmr fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9882 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 13:59:46 +00:00
lissav 6e601374b6 fix for defect 3324448, remove pmr fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9881 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-22 13:58:44 +00:00
jbjohnso c1483cc7db Port forward fix for netstart issue with RHEL statelesess
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9878 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-21 19:30:30 +00:00
daniceexi 7df4643089 defect 3317678: fix the issue that cannot get correct nodestate which causing the error to generate the path of synclist and otherpkgs configuration files for diskless
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9851 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-20 03:06:50 +00:00
lissav e0dad7b643 enhance manpage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9849 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-19 10:31:44 +00:00
lissav 9e96941ca3 fix defect 3317760
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9841 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-17 11:13:00 +00:00
sjing b303b5d01a deleting bind.pm, and use ddns.pm as the default dns handler.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9831 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-17 02:22:18 +00:00
jbjohnso a3d8e0d6c4 Workaround issues when getipaddr returns undefined value in ddns
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9828 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-16 14:01:25 +00:00
bp-sawyers a1793645fe Update the version # for the 2.6 branch to 2.6.1
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9806 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-15 15:26:32 +00:00
jbjohnso 74f377d956 Have rinv -t in vmware detect when server says storage is not where xCAT thinks it should be, and rewrite xCAT tables
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9798 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-13 17:29:38 +00:00
lissav 7a34476de2 fix defect 3315725
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9795 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-13 16:46:01 +00:00
lissav b197c84c81 fix defect 3315725
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9794 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-13 16:39:09 +00:00
jbjohnso 9dd8c297d9 Fix dhcpd.conf mistake with ddns-domainname
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9783 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-10 17:59:05 +00:00
lissav 236d5e236a fix provmethod explanation in nodetype table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9782 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-10 14:53:44 +00:00
jbjohnso 813ca61a72 Backport chhypervisor from trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9779 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-09 21:01:11 +00:00
linggao 32baaa1256 Modified setupscratch postscript to take -f as an argument. Also added support for postscripts to take arguments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9775 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-09 17:53:18 +00:00
jbjohnso feec1700ff Implement -t argument for blade plugin to update vpd table with mtm/serial/uuid
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9774 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-09 15:25:42 +00:00
jbjohnso 0c026583a4 Allow reventlog -f clear for forcing blade clear
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9772 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-09 15:06:19 +00:00
linggao cec3852ace new postscript to setup a scratch area on local disk for stateless nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9770 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-08 21:18:24 +00:00
bp-sawyers 940d40dc20 Updated descriptions in Schema.pm for tables: noderes, nodetype, boottarget
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9731 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-06-02 20:26:42 +00:00
lissav 7bf773153c add vsftp
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9719 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-31 15:08:54 +00:00
linggao 02a3edbc58 added site table attribute to not allow xcatd on the mn to bring up vsftpd automatically
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9707 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-27 14:50:57 +00:00
daniceexi 45ed594a42 defect 3203276: make the genimage get the additional kernel from rpm package instead of extracted files
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9704 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-27 03:35:08 +00:00
daniceexi ec371ffc98 The nfs should be included in the initrd for stateltess since it will be used for statelite ramdisk mode
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9703 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-27 03:01:42 +00:00
linggao 6e235884d9 merge the prescript changes made in r9606 to 2.6 branch
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9696 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-26 18:00:23 +00:00
jbjohnso 7bdd6e6368 -Backport fix for nodestat on non-install nodes with specific 3001 service
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9688 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-26 14:18:34 +00:00
sjing 743056043d support ddns as the default dnshandler.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9664 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-24 02:24:05 +00:00
sjing 56e4338410 support ddns as the default dnshandler.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9663 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-24 02:19:41 +00:00
sjing dd46b00066 support ddns as the default dnshandler.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9662 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-24 02:17:36 +00:00
bp-sawyers 7b4d83793a Remove the debian kernel for legal reasons
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9658 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-23 17:43:25 +00:00
linggao 428e30f98f fixed defect 3302671 and 3299348
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9605 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-16 19:04:27 +00:00
jbjohnso ce3fcef399 Backport fix for vidproto fixup on KVM
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9598 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-13 15:22:58 +00:00
wanghuaz bc4ff1b05f Fixed one issue in lsslp that the CEC name is possible to overwrite one of the FSP name.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9589 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-13 06:29:49 +00:00
wanghuaz 9570d8f83b fixed bug that rscan -u is not working properly in migration.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9588 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-13 00:45:07 +00:00
jbjohnso c56696aff3 Merge back bmcsetup changes from trunk
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9587 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-12 18:15:14 +00:00
yinle db8cdd11d0 Modify the way of getHMCcontrolIP, handle different condition way of fsp/bap with HMC.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9583 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-12 15:18:13 +00:00
jbjohnso 0254709d2e Shorten validity of remote video token
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9580 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-12 14:04:47 +00:00
yinle a0c6ac79c1 Fix bug 3300359 : rspconfig HMC sshcfg not display correct state on AIX71B
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9578 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-12 10:16:13 +00:00
jbjohnso fe3cc45a62 Backport fix for xHRM script
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9570 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-11 17:53:16 +00:00
jjhua 1a2abfc32f rflash supports for CEC and frame
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9563 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-11 10:16:14 +00:00
yinle c80d89c661 Fix bug 3299851: rvitals CEC temp give error mesg under Redundant fsp
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9561 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-11 08:52:09 +00:00
yinle b7194852a4 remove the "=" to match the new AIX ssh key file
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9560 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-11 08:07:18 +00:00
linggao 27242db435 make sure to use the full path for searching the pkg names in genimage
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9554 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 21:16:09 +00:00
jbjohnso 29f32d3b04 Implement chvm cdrom and eject for VMware
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9549 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 16:09:38 +00:00
jbjohnso 6c6d66efe4 Fix mkvm for many IDE devices
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9547 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 15:15:41 +00:00
jbjohnso 7d564cd088 Backport add of empty optical drive on mkvm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9545 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 14:23:19 +00:00
daniceexi 9835df7b64 defect 3297886: fix the issue that handling the variable in the dir of statemnt attribute
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9540 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 11:34:39 +00:00
yinle e236c61cda Modify defect 3299796: rspconfig could not config password
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9534 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 08:15:46 +00:00
yinle ef6b1738bc modify sethmcmgt and rmhmcmgt, modify hcp and mgt about fsp/bpa with cec/frame
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9530 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 08:04:41 +00:00
wanghuaz d4de05052a Fixed a bug that lsslp cannot set CEC's parent to frame defined in xCAT DB
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9526 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-10 07:35:18 +00:00
jbjohnso 037585d6c7 Fix wvid hang on KVM guests if guest is off
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9523 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-09 16:33:26 +00:00
jbjohnso 790199e176 Fix x3755 M3 alert policy table to match chosen path
Implement multi-bmc support for x3850 X5 and x3950 X5


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9521 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-09 15:10:29 +00:00
mxi1 74b07bf416 for defect 3293662, the "nodeset statelite" command will detect the rootfstype attribute automatically for both sles and redhat.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9515 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-09 02:43:42 +00:00
yinle cd882bff45 Fix bug 3298172:rmhwconn CEC will change mgt to cec
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9514 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-09 01:56:20 +00:00
sjing 51e861fedc Fix for bug 3298196.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9512 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-09 01:54:39 +00:00
jbjohnso 0ac03023e8 Opportunistically change listen parameter on VMs for new rvid behavior
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9503 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 14:20:37 +00:00
jbjohnso fae8bdaf07 Fix kvm clonevm when master includes empty optical drive
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9502 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 14:16:25 +00:00
jbjohnso 9a1c7d166f Add required columns to vm table for recent KVM enhancements
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9501 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 12:58:08 +00:00
jbjohnso f39c58662d Accept optical as description for optical drives in kvm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9500 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 12:55:28 +00:00
jbjohnso 053fd1611f Backport a few features from trunk:
KVM:
	-Remote video enhancements for password use, remote listen, and SPICE
	-chvm allows attaching/removing an iso as optical 
ESX:
	-Support linked clones
	-Presume a clone target is in the same datastore as source when not specified


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9499 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 12:52:10 +00:00
wanghuaz 6153c74606 revert last checkin for hfi mac address failover in xcat 2.6.0
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9498 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 09:34:09 +00:00
wanghuaz be78497238 HFI mac address failover checkin for 2.6.2
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9496 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-06 03:15:34 +00:00
jbjohnso 16ac237f18 Delete spurious inittab config, doesn't seem to even be used at all
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9487 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-04 17:56:27 +00:00
jbjohnso 58a20e2b54 Correct xnba machyp syntax for the present, worry about the future when iPXE doesn't hang in my environment
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9479 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-03 15:40:11 +00:00
jbjohnso ea94719691 Fix erroneous extra BOOTIF in x86 netboot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9478 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-03 15:35:48 +00:00
jbjohnso 3be19b1039 Fix BPET5B and similar firmware
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9476 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-05-03 15:24:54 +00:00
wanghuaz 67bc1e0666 Fixed bug 3294236 to the getmacs issue.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9426 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-04-28 08:01:10 +00:00
bp-sawyers 45712b109d A https://xcat.svn.sourceforge.net/svnroot/xcat/xcat-core/branches/2.6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9399 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2011-04-26 14:30:22 +00:00
199 changed files with 9302 additions and 3385 deletions
+1 -1
View File
@@ -1 +1 @@
2.6.6
2.6.12
+158 -175
View File
@@ -11,10 +11,10 @@
# the upload user listed below, so you don't have to keep entering pw's. You can do this
# at https://sourceforge.net/account/ssh
# - On Linux: make sure createrepo is installed on the build machine
# - On AIX: Install openssl and openssh installp pkgs and run updtvpkg. Install from http://www.perzl.org/aix/
# - On AIX: Install openssl and openssh installp pkgs and run updtvpkg. Install from http://www.perzl.org/aix/ :
# apr, apr-util, bash, bzip2, db4, expat, gdbm, gettext, glib2, gmp, info, libidn, neon, openssl (won't
# conflict with the installp version), pcre, perl-DBD-SQLite, perl-DBI, popt, python, readline, rsynce, sqlite,
# subversion, unixODBC, wget, zlib.
# conflict with the installp version - but i don't think you need this), pcre, perl-DBD-SQLite, perl-DBI,
# popt, python, readline, rsynce, sqlite, subversion, unixODBC, zlib. Install wget from http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html
# - Run this script from the local svn repository you just created. It will create the other
# directories that are needed.
@@ -25,18 +25,33 @@
# xcat-core tarball to the SF web site instead of the FRS area.
# UP=0 or UP=1 - override the default upload behavior
# SVNUP=<filename> - control which rpms get built by specifying a coresvnup file
# FRSYUM=0 - put the yum repo and snap builds in the old project web area instead of the FRS area.
# VERBOSE=1 - to see lots of verbose output
# you can change this if you need to
UPLOADUSER=bp-sawyers
FRS=/home/frs/project/x/xc/xcat
OSNAME=$(uname)
# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name
for i in $*; do
# upper case the variable name
varstring=`echo "$i"|cut -d '=' -f 1|tr '[a-z]' '[A-Z]'`=`echo "$i"|cut -d '=' -f 2`
export $varstring
done
if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ]; then
set -x
VERBOSEMODE=1
fi
# Find where this script is located to set some build variables
cd `dirname $0`
# Strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release
CURDIR=`pwd`
#D=${CURDIR/\/src\/xcat-core/}
D=${CURDIR%/src/xcat-core}
REL=`basename $D`
# strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release
if [ -z "$REL" ]; then
curdir=`pwd`
D=${curdir%/src/xcat-core}
REL=`basename $D`
fi
OSNAME=$(uname)
if [ "$OSNAME" != "AIX" ]; then
GSA=http://pokgsa.ibm.com/projects/x/xcat/build/linux
@@ -47,22 +62,23 @@ if [ "$OSNAME" != "AIX" ]; then
echo "Can't get lock /var/lock/xcatbld-$REL.lock. Someone else must be doing a build right now. Exiting...."
exit 1
fi
fi
set -x
# Process cmd line variable assignments, assigning each attr=val pair to a variable of same name
for i in $*; do
#declare `echo $i|cut -d '=' -f 1`=`echo $i|cut -d '=' -f 2`
export $i
done
if [ "$OSNAME" != "AIX" ]; then
export HOME=/root # This is so rpm and gpg will know home, even in sudo
fi
XCATCORE="xcat-core"
svn up Version
# this is needed only when we are transitioning the yum over to frs
if [ "$FRSYUM" != 0 ]; then
YUMDIR=$FRS
YUMREPOURL="https://sourceforge.net/projects/xcat/files/yum"
else
YUMDIR=htdocs
YUMREPOURL="http://xcat.sourceforge.net/yum"
fi
# Set variables based on which type of build we are doing
XCATCORE="xcat-core" # core-snap is a sym link to xcat-core
echo "svn --quiet up Version"
svn --quiet up Version
VER=`cat Version`
SHORTVER=`cat Version|cut -d. -f 1,2`
SHORTSHORTVER=`cat Version|cut -d. -f 1`
@@ -89,8 +105,12 @@ if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if w
mkdir -p $DESTDIR
SRCDIR=../../$SRCD
mkdir -p $SRCDIR
GREP=grep
# currently aix builds ppc rpms, but it should build noarch
if [ -n "$VERBOSEMODE" ]; then
GREP=grep
else
GREP="grep -q"
fi
# currently aix builds ppc rpms, but someday it should build noarch
if [ "$OSNAME" = "AIX" ]; then
NOARCH=ppc
else
@@ -100,172 +120,113 @@ UPLOAD=0
if [ "$OSNAME" = "AIX" ]; then
source=/opt/freeware/src/packages
else
if [ -f /etc/redhat-release ]; then
source="/usr/src/redhat"
else
source="/usr/src/packages"
source=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec`
if [ $? -gt 0 ]; then
echo "Error: Could not determine rpmbuild's root directory."
exit 2
fi
#echo "source=$source"
fi
# If they have not given us a premade update file, do an svn update and capture the results
if [ -z "$SVNUP" ]; then
SVNUP=../coresvnup
echo "svn up > $SVNUP"
svn up > $SVNUP
fi
# If anything has changed, we should always rebuild perl-xCAT
if ! $GREP 'At revision' $SVNUP; then # Use to be: $GREP perl-xCAT $SVNUP; then
UPLOAD=1
./makeperlxcatrpm
rm -f $DESTDIR/perl-xCAT*rpm
rm -f $SRCDIR/perl-xCAT*rpm
mv $source/RPMS/$NOARCH/perl-xCAT-$VER*rpm $DESTDIR/
mv $source/SRPMS/perl-xCAT-$VER*rpm $SRCDIR/
UPLOAD=1
./makerpm perl-xCAT
if [ $? -ne 0 ]; then
FAILEDRPMS="perl-xCAT"
else
rm -f $DESTDIR/perl-xCAT*rpm
rm -f $SRCDIR/perl-xCAT*rpm
mv $source/RPMS/$NOARCH/perl-xCAT-$VER*rpm $DESTDIR/
mv $source/SRPMS/perl-xCAT-$VER*rpm $SRCDIR/
fi
fi
if [ "$OSNAME" = "AIX" ]; then
# For the 1st one we overwrite, not append
echo "rpm -Uvh perl-xCAT-$SHORTSHORTVER*rpm" > $DESTDIR/instxcat
fi
if $GREP xCAT-client $SVNUP; then
UPLOAD=1
./makeclientrpm
rm -f $DESTDIR/xCAT-client*rpm
rm -f $SRCDIR/xCAT-client*rpm
mv $source/RPMS/$NOARCH/xCAT-client-$VER*rpm $DESTDIR/
mv $source/SRPMS/xCAT-client-$VER*rpm $SRCDIR/
fi
if [ "$OSNAME" = "AIX" ]; then
echo "rpm -Uvh xCAT-client-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
fi
if $GREP xCAT-UI $SVNUP; then
UPLOAD=1
rm -f $DESTDIR/xCAT-UI*rpm
rm -f $SRCDIR/xCAT-UI*rpm
./makeuirpm
mv $source/RPMS/noarch/xCAT-UI-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-UI-$VER*rpm $SRCDIR
fi
# Do not automatically install xCAT-UI on AIX
#if [ "$OSNAME" = "AIX" ]; then
# echo "rpm -Uvh xCAT-UI-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
#fi
if $GREP xCAT-IBMhpc $SVNUP; then
UPLOAD=1
rm -f $DESTDIR/xCAT-IBMhpc*rpm
rm -f $SRCDIR/xCAT-IBMhpc*rpm
./makehpcrpm
mv $source/RPMS/$NOARCH/xCAT-IBMhpc-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-IBMhpc-$VER*rpm $SRCDIR
fi
# Do not automatically install xCAT-IBMhpc on AIX
#if [ "$OSNAME" = "AIX" ]; then
# echo "rpm -Uvh xCAT-IBMhpc-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
#fi
if $GREP xCAT-server $SVNUP; then
UPLOAD=1
./makeserverrpm
rm -f $DESTDIR/xCAT-server*rpm
rm -f $SRCDIR/xCAT-server*rpm
mv $source/RPMS/$NOARCH/xCAT-server-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-server-$VER*rpm $SRCDIR
fi
if [ "$OSNAME" = "AIX" ]; then
echo "rpm -Uvh xCAT-server-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
fi
if $GREP xCAT-rmc $SVNUP; then
UPLOAD=1
./makermcrpm
rm -f $DESTDIR/xCAT-rmc*rpm
rm -f $SRCDIR/xCAT-rmc*rpm
mv $source/RPMS/$NOARCH/xCAT-rmc-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-rmc-$VER*rpm $SRCDIR
fi
# Note: not putting xCAT-rmc into instxcat for aix here, because it has to be installed
# after xCAT.
if $GREP xCAT-test $SVNUP; then
UPLOAD=1
./maketestrpm
rm -f $DESTDIR/xCAT-test*rpm
rm -f $SRCDIR/xCAT-test*rpm
mv $source/RPMS/$NOARCH/xCAT-test-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-test-$VER*rpm $SRCDIR
fi
# Note: not putting xCAT-test into instxcat for aix, because it is optional
# Build the rest of the noarch rpms
for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test; do
if $GREP $rpmname $SVNUP; then
UPLOAD=1
./makerpm $rpmname
if [ $? -ne 0 ]; then
FAILEDRPMS="$FAILEDRPMS $rpmname"
else
rm -f $DESTDIR/$rpmname*rpm
rm -f $SRCDIR/$rpmname*rpm
mv $source/RPMS/$NOARCH/$rpmname-$VER*rpm $DESTDIR/
mv $source/SRPMS/$rpmname-$VER*rpm $SRCDIR/
fi
fi
if [ "$OSNAME" = "AIX" ]; then
if [ "$rpmname" = "xCAT-client" -o "$rpmname" = "xCAT-server" ]; then # we do not automatically install the rest of the rpms on AIX
echo "rpm -Uvh $rpmname-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
fi
fi
done
if [ "$OSNAME" != "AIX" ]; then
if $GREP xCAT-nbroot $SVNUP; then
UPLOAD=1
./makenbrootrpm x86_64
./makenbrootrpm ppc64
./makenbrootrpm x86
rm -f $DESTDIR/xCAT-nbroot-core*rpm
rm -f $SRCDIR/xCAT-nbroot-core*rpm
mv $source/RPMS/noarch/xCAT-nbroot-core-*rpm $DESTDIR
mv $source/SRPMS/xCAT-nbroot-core-*rpm $SRCDIR
UPLOAD=1
ORIGFAILEDRPMS="$FAILEDRPMS"
for arch in x86_64 x86 ppc64; do
./makerpm xCAT-nbroot-core $arch
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-nbroot-core-$arch"; fi
done
if [ "$FAILEDRPMS" = "$ORIGFAILEDRPMS" ]; then # all succeeded
rm -f $DESTDIR/xCAT-nbroot-core*rpm
rm -f $SRCDIR/xCAT-nbroot-core*rpm
mv $source/RPMS/noarch/xCAT-nbroot-core-*rpm $DESTDIR
mv $source/SRPMS/xCAT-nbroot-core-*rpm $SRCDIR
fi
fi
fi
if $GREP -E '^[UAD] +xCATsn/' $SVNUP; then
UPLOAD=1
rm -f $DESTDIR/xCATsn-*rpm
rm -f $SRCDIR/xCATsn-*rpm
if [ "$OSNAME" = "AIX" ]; then
./makexcatsnrpm
mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR
mv $source/SRPMS/xCATsn-$VER*rpm $SRCDIR
else
./makexcatsnrpm x86_64
mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR
mv $source/SRPMS/xCATsn-$VER*rpm $SRCDIR
./makexcatsnrpm i386
mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR
./makexcatsnrpm ppc64
mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR
./makexcatsnrpm s390x
mv $source/RPMS/*/xCATsn-$VER*rpm $DESTDIR
# Build the xCAT and xCATsn rpms for all platforms
for rpmname in xCAT xCATsn; do
if $GREP -E "^[UAD] +$rpmname/" $SVNUP; then
UPLOAD=1
ORIGFAILEDRPMS="$FAILEDRPMS"
if [ "$OSNAME" = "AIX" ]; then
./makerpm $rpmname
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname"; fi
else
for arch in x86_64 i386 ppc64 s390x; do
./makerpm $rpmname $arch
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname-$arch"; fi
done
fi
if [ "$FAILEDRPMS" = "$ORIGFAILEDRPMS" ]; then # all succeeded
rm -f $DESTDIR/$rpmname-$SHORTSHORTVER*rpm
rm -f $SRCDIR/$rpmname-$SHORTSHORTVER*rpm
mv $source/RPMS/*/$rpmname-$VER*rpm $DESTDIR
mv $source/SRPMS/$rpmname-$VER*rpm $SRCDIR
fi
fi
fi
if $GREP -E '^[UAD] +xCAT/' $SVNUP; then
UPLOAD=1
rm -f $DESTDIR/xCAT-$SHORTSHORTVER*rpm
rm -f $SRCDIR/xCAT-$SHORTSHORTVER*rpm
if [ "$OSNAME" = "AIX" ]; then
./makexcatrpm
mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-$VER*rpm $SRCDIR
else
./makexcatrpm x86_64
mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR
mv $source/SRPMS/xCAT-$VER*rpm $SRCDIR
./makexcatrpm i386
mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR
./makexcatrpm ppc64
mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR
./makexcatrpm s390x
mv $source/RPMS/*/xCAT-$VER*rpm $DESTDIR
fi
fi
done
if [ "$OSNAME" = "AIX" ]; then
echo "rpm -Uvh xCAT-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
echo "rpm -Uvh xCAT-rmc-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
# add the service node bundle files
# these are now shipped as part of xCAT-server !!!!
# - installed in /opt/xcat/share/xcat/installp_bundles
# cp xCATaixSN.bnd xCATaixSN2.bnd xCATaixSSH.bnd xCATaixSSL.bnd $DESTDIR/
fi
# Decide if anything was built or not
if [ -n "$FAILEDRPMS" ]; then
echo "Error: build of the following RPMs failed: $FAILEDRPMS"
exit 2
fi
if [ $UPLOAD == 0 -a "$UP" != 1 ]; then
echo "Nothing new detected"
exit 0;
exit 0
fi
#else we will continue
@@ -283,14 +244,15 @@ if [ "$OSNAME" != "AIX" ]; then
done
# tell rpm to use gpg to sign
MACROS=$HOME/.rpmmacros
if ! $GREP -q '%_signature gpg' $MACROS 2>/dev/null; then
if ! $GREP '%_signature gpg' $MACROS 2>/dev/null; then
echo '%_signature gpg' >> $MACROS
fi
if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then
if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name Jarrod Johnson' >> $MACROS
fi
build-utils/rpmsign.exp $DESTDIR/*rpm
build-utils/rpmsign.exp $SRCDIR/*rpm
echo "Signing RPMs..."
build-utils/rpmsign.exp $DESTDIR/*rpm | grep -v -E '(was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v -E '(was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
createrepo $DESTDIR
createrepo $SRCDIR
rm -f $SRCDIR/repodata/repomd.xml.asc
@@ -307,10 +269,14 @@ fi
# make everything have a group of xcat, so anyone can manage them once they get on SF
if [ "$OSNAME" = "AIX" ]; then
mkgroup xcat 2>/dev/null
if ! lsgroup xcat >/dev/null 2>&1; then
mkgroup xcat
fi
chmod +x $DESTDIR/instxcat
else
groupadd -f xcat
else # linux
if ! $GREP xcat /etc/group; then
groupadd xcat
fi
fi
chgrp -R xcat $DESTDIR
chmod -R g+w $DESTDIR
@@ -328,10 +294,10 @@ if [ "$OSNAME" != "AIX" ]; then
cat >xCAT-core.repo << EOF
[xcat-2-core]
name=xCAT 2 Core packages
baseurl=http://xcat.sourceforge.net/yum/$REL/$CORE
baseurl=$YUMREPOURL/$REL/$CORE
enabled=1
gpgcheck=1
gpgkey=http://xcat.sourceforge.net/yum/$REL/$CORE/repodata/repomd.xml.key
gpgkey=$YUMREPOURL/$REL/$CORE/repodata/repomd.xml.key
EOF
# Create the mklocalrepo script
@@ -348,12 +314,18 @@ fi # not AIX
# Build the tarball
cd ..
if [ -n "$VERBOSEMODE" ]; then
verboseflag="-v"
else
verboseflag=""
fi
echo "Creating $TARNAME ..."
if [ "$OSNAME" = "AIX" ]; then
tar -hcvf ${TARNAME%.gz} $XCATCORE
tar $verboseflag -hcf ${TARNAME%.gz} $XCATCORE
rm -f $TARNAME
gzip ${TARNAME%.gz}
else
tar -hjcvf $TARNAME $XCATCORE
tar $verboseflag -hjcf $TARNAME $XCATCORE
fi
chgrp xcat $TARNAME
chmod g+w $TARNAME
@@ -373,33 +345,44 @@ fi
if [ ! -e core-snap ]; then
ln -s xcat-core core-snap
fi
while ! rsync -urLv --delete $CORE $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/$REL/
do : ; done
if [ "$REL" = "devel" -o "$PREGA" != 1 ]; then
i=0
echo "Uploading RPMs from $CORE to $YUMDIR/$YUM/$REL/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete $CORE $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/$REL/
do : ; done
fi
# Upload the individual source RPMs to sourceforge
while ! rsync -urLv --delete $SRCD $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/$REL/
i=0
echo "Uploading src RPMs from $SRCD to $YUMDIR/$YUM/$REL/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete $SRCD $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/$REL/
do : ; done
# Upload the tarball to sourceforge
if [ "$PROMOTE" = 1 -a "$REL" != "devel" -a "$PREGA" != 1 ]; then
# upload tarball to FRS area
#scp $TARNAME $UPLOADUSER@web.sourceforge.net:uploads/
while ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/xcat/$REL.x_$OSNAME/
i=0
echo "Uploading $TARNAME to $FRS/xcat/$REL.x_$OSNAME/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:$FRS/xcat/$REL.x_$OSNAME/
do : ; done
else
while ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:htdocs/$YUM/$REL/
i=0
echo "Uploading $TARNAME to $YUMDIR/$YUM/$REL/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -v $TARNAME $UPLOADUSER,xcat@web.sourceforge.net:$YUMDIR/$YUM/$REL/
do : ; done
fi
# Extract and upload the man pages in html format
if [ "$OSNAME" != "AIX" -a "$REL" = "devel" -a "$PROMOTE" != 1 ]; then
echo "Extracting and uploading man pages to htdocs/ ..."
mkdir -p man
cd man
rm -rf opt
rpm2cpio ../$XCATCORE/xCAT-client-*.$NOARCH.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/perl-xCAT-*.$NOARCH.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/xCAT-test-*.$NOARCH.rpm | cpio -id '*.html'
while ! rsync -rv opt/xcat/share/doc/man1 opt/xcat/share/doc/man3 opt/xcat/share/doc/man5 opt/xcat/share/doc/man7 opt/xcat/share/doc/man8 $UPLOADUSER,xcat@web.sourceforge.net:htdocs/
i=0
while [ $((i+=1)) -le 5 ] && ! rsync $verboseflag -r opt/xcat/share/doc/man1 opt/xcat/share/doc/man3 opt/xcat/share/doc/man5 opt/xcat/share/doc/man7 opt/xcat/share/doc/man8 $UPLOADUSER,xcat@web.sourceforge.net:htdocs/
do : ; done
cd ..
fi
Executable
+172
View File
@@ -0,0 +1,172 @@
# The shell is commented out so that it will run in bash on linux and ksh on aix
# !/bin/bash
# Common script to make any one the xcat rpms. To build locally, run in the top dir of local svn repository, for example:
# ./makerpm xCAT-server
# ./makerpm xCAT x86_64
# set -x
# Make one of the following rpms: perl-xCAT, xCAT-server, xCAT-client, xCAT-IBMhpc, xCAT-rmc, xCAT-UI, xCAT-test
function makenoarch {
RPMNAME=$1
if [ "$OSNAME" = "AIX" ]; then
echo '.svn' > /tmp/xcat-excludes
tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/$RPMNAME-$VER.tar $RPMNAME
gzip -f $RPMROOT/SOURCES/$RPMNAME-$VER.tar
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/ppc/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/ppc/$RPMNAME-$VER-snap*.ppc.rpm ..."
rpm $QUIET -ba $RPMNAME/$RPMNAME.spec
RC=$?
else # linux
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm ..."
tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME
rm -f $RPMROOT/SRPMS/xCAT-server-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz
RC=$?
fi
}
# Make one of the following rpms: xCAT, xCATsn
function makexcat {
if [ "$OSNAME" != "AIX" -a -z "$2" ]; then
echo 'Usage: makerpm <RPMname> <arch>'
exit 1
fi
RPMNAME="$1"
if [ "$OSNAME" = "AIX" ]; then
source=/opt/freeware/src/packages
cd `dirname $0`/$RPMNAME
echo '.svn' > /tmp/xcat-excludes
echo 'upflag' >> /tmp/xcat-excludes
if [ "$RPMNAME" = "xCAT" ]; then
tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/postscripts.tar postscripts LICENSE.html
gzip -f $RPMROOT/SOURCES/postscripts.tar
tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/templates.tar templates
gzip -f $RPMROOT/SOURCES/templates.tar
cp xcat.conf $RPMROOT/SOURCES
cp xCATMN $RPMROOT/SOURCES
else # xCATsn
tar -X /tmp/xcat-excludes -cf $RPMROOT/SOURCES/license.tar LICENSE.html
gzip -f $RPMROOT/SOURCES/license.tar
cp xCATSN $RPMROOT/SOURCES
fi
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/ppc/$RPMNAME-$VER*rpm
cd - >/dev/null
echo "Building $RPMROOT/RPMS/ppc/$RPMNAME-$VER-snap*.ppc.rpm ..."
rpm $QUIET -ba $RPMNAME/$RPMNAME.spec
RC=$?
else # linux
ARCH="$2"
cd `dirname $0`/$RPMNAME
if [ "$RPMNAME" = "xCAT" ]; then
tar --exclude .svn -czf $RPMROOT/SOURCES/postscripts.tar.gz postscripts LICENSE.html
tar --exclude .svn -czf $RPMROOT/SOURCES/prescripts.tar.gz prescripts
tar --exclude .svn -czf $RPMROOT/SOURCES/templates.tar.gz templates
cp xcat.conf $RPMROOT/SOURCES
cp xCATMN $RPMROOT/SOURCES
else # xCATsn
tar --exclude .svn -czf $RPMROOT/SOURCES/license.tar.gz LICENSE.html
cp xcat.conf $RPMROOT/SOURCES
cp xCATSN $RPMROOT/SOURCES
fi
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm ..."
rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec --target $ARCH
RC=$?
fi
}
# Make the xCAT-nbroot-core rpm
function makenbroot {
if [ -z "$2" ]; then
echo 'Usage: makerpm xCAT-nbroot-core <arch>'
exit 1
fi
DIR="xCAT-nbroot"
ARCH="$2"
RPMNAME="xCAT-nbroot-core-$ARCH"
SPEC="xcat-core-nbroot"
cd `dirname $0`/$DIR
tar --exclude .svn -czf $RPMROOT/SOURCES/xcat-nbrootoverlay.tar.gz -C overlay/ .
cp LICENSE.html $RPMROOT/BUILD
cp $SPEC.spec $RPMROOT/SOURCES
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm ..."
rpmbuild $QUIET -ba $DIR/$SPEC.spec --target $ARCH
}
# Make the xCAT-nbroot-core rpm
function makegenesis {
DIR="xCAT-nbroot2"
RPMNAME="$1"
cd `dirname $0`/$DIR
tar --exclude .svn -cjf $RPMROOT/SOURCES/$RPMNAME.tar.bz2 .
cp LICENSE.html $RPMROOT/BUILD
cp $RPMNAME.spec $RPMROOT/SOURCES
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm ..."
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec
}
# Main code....
if [ -z "$1" ]; then
echo 'Usage: makerpm <RPMname> [<arch>]'
exit 1
fi
OSNAME=$(uname)
VER=`cat Version`
if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then
QUIET=""
else
QUIET="--quiet"
fi
if [ "$OSNAME" = "AIX" ]; then
RPMROOT=/opt/freeware/src/packages
else # linux
rpmbuild --version > /dev/null
if [ $? -gt 0 ]; then
echo "Error: rpmbuild does not appear to be installed or working."
exit 2
fi
RPMROOT=`rpmbuild --eval '%_topdir' xCATsn/xCATsn.spec`
if [ $? -gt 0 ]; then
echo "Error: Could not determine rpmbuild's root directory."
exit 2
fi
fi
if [ "$1" = "xCAT" -o "$1" = "xCATsn" ]; then
makexcat $*
elif [ "$1" = "xCAT-nbroot" -o "$1" = "xCAT-nbroot-core" ]; then
makenbroot xCAT-nbroot-core $2
elif [ "$1" = "xCAT-genesis-builder" ]; then
makegenesis $*
else # must be one of the noarch rpms
makenoarch $*
fi
exit $RC
+18 -15
View File
@@ -1,24 +1,27 @@
#!/bin/sh
# Put the version, svn revision #, and build date into the Version function in Version.pm
if [ -z "$1" ]
if [ -z "$2" ]
then
echo "modifyVersion: Error: must specify the xCAT version as an argument!"
echo "modifyUtils: Error: must specify the xCAT version and svn revision number as arguments" >&2
exit
fi
VER=$1
SVNINFO=`svn info 2>/dev/null|grep Revision`
#/bin/echo -e $SVNINFO
if [ $? -ne 0 -a -f .svninfo ]; then
SVNINFO=`cat .svninfo 2>/dev/null|grep Revision`
fi
if [ $? -eq 0 ]
then
SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", "
else
SVNREF=""
fi
VER=$1
SVNREF="svn r$2, "
#SVNINFO=`svn info 2>/dev/null|grep Revision`
#/bin/echo -e $SVNINFO
#if [ $? -ne 0 -a -f .svninfo ]; then
# SVNINFO=`cat .svninfo 2>/dev/null|grep Revision`
#fi
#if [ $? -eq 0 ]
# then
# SVNREF="svn r"`echo $SVNINFO|awk '{print $2}'`", "
# else
# SVNREF=""
# fi
BUILDDATE=`date`
#echo ". '(${SVNREF}built $BUILDDATE)'"
+15 -1
View File
@@ -22,6 +22,8 @@ Provides: perl-xCAT = %{epoch}:%{version}
Provides perl xCAT libraries for core functionality. Required for all xCAT installations.
Includes xCAT::Table, xCAT::NodeRange, among others.
%define svninfo %(svn info | grep Revision | awk '{print $2}')
%prep
%setup -q -n perl-xCAT
%build
@@ -30,7 +32,7 @@ Includes xCAT::Table, xCAT::NodeRange, among others.
# as it is in svn.
# Modify the Version() function in xCAT/Utils.pm to automatically have the correct version
./modifyUtils %{version}
./modifyUtils %{version} %{svninfo}
# Build the pod version of the man pages for each DB table. It puts them in the man5 and man7 subdirs.
# Then convert the pods to man pages and html pages.
@@ -92,6 +94,18 @@ rm -rf $RPM_BUILD_ROOT
# Just package everything that has been copied into RPM_BUILD_ROOT
%{prefix}
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%ifos linux
if [ "$1" -gt 1 ]; then #Ugrade only, restart daemon and migrate settings
+10 -2
View File
@@ -319,6 +319,11 @@ sub plugin_command {
unless (@nodes) {
$req->{emptynoderange} = [1];
}
if(@nodes == 0 ) {
print "No nodes or noderanges specified\n";
return 1;
}
}
if (@nodes) { $req->{node} = \@nodes; }
my %unhandled_nodes;
@@ -947,9 +952,12 @@ sub handle_response {
# Handle {node} structure
my $errflg=0;
if (scalar @{$rsp->{node}}) {
#print "printing node\n";
my $nodes=($rsp->{node});
unless (ref $nodes eq 'ARRAY') {
$nodes = [$nodes];
}
if (scalar @{$nodes}) {
#print "printing node\n";
my $node;
foreach $node (@$nodes) {
my $desc=$node->{name}->[0];
+156 -111
View File
@@ -10,17 +10,16 @@
#####################################################
package xCAT::DBobjUtils;
use xCAT::NodeRange;
use xCAT::Schema;
use xCAT::Table;
use xCAT::Utils;
use xCAT::MsgUtils;
use xCAT::NetworkUtils;
require xCAT::NodeRange;
require xCAT::Schema;
require xCAT::Table;
require xCAT::Utils;
require xCAT::MsgUtils;
require xCAT::NetworkUtils;
use strict;
# IPv6 not yet implemented - need Socket6
use Socket;
my @tabletype = qw(ppc zvm);
#----------------------------------------------------------------------------
@@ -1039,7 +1038,8 @@ sub setobjdefs
#
# get the actual attr name to use in the table
# - may be different then the attr name used for the object.
($::tab, $::tabattr) = split('\.', $this_attr->{tabentry});
my $ntab;
($ntab, $::tabattr) = split('\.', $this_attr->{tabentry});
my $rc = xCAT::DBobjUtils->parse_access_tabentry($objname,
$this_attr->{access_tabentry}, \%tabentry);
@@ -2073,23 +2073,28 @@ sub parse_access_tabentry()
#-------------------------------------------------------------------------------
=head3 getchildren
returns fsp(or bpa) of the specified cec(or frame),
if specified port, it will just return nodes within the port.
Arguments:
none
single hostname
optional port number
Returns:
refrence of fsp/bpa hostnames (IPs)
array of fsp/bpa hostnames (IPs)
if specified port, it will just return nodes within the port.
Globals:
%PARENT_CHILDREN
%PPCHASH - HASH of nodename -> array of ip addresses
where the nodetype is fsp or bpa
Error:
none
$::RUNCMD_RC = 1;
Writes error to syslog
Example:
$c1 = getchildren($nodetocheck);
$c1 = getchildren($nodetocheck,$port);
Comments:
none
=cut
#-------------------------------------------------------------------------------
my %PPCHASH;
sub getchildren
{
my $parent = shift;
@@ -2097,73 +2102,94 @@ sub getchildren
{
$parent = shift;
}
$::RUNCMD_RC = 0;
my $port = shift;
my @tabletype = qw(ppc zvm);
my @children = ();
my @children_prot = ();
if (!%::PARENT_CHILDREN) {
my @children_port = ();
if (!%PPCHASH) {
my $ppctab = xCAT::Table->new( 'ppc' );
my @ps = $ppctab->getAllNodeAttribs(['node','parent']);
for my $entry ( @ps ) {
unless ($ppctab) { # cannot open the table return with error
xCAT::MsgUtils->message('S', "getchildren:Unable to open ppc table.\n");
$::RUNCMD_RC = 1;
return undef;
}
my @ps = $ppctab->getAllNodeAttribs(['node','parent','nodetype']);
foreach my $entry ( @ps ) {
my $p = $entry->{parent};
my $c = $entry->{node};
my $t = $entry->{nodetype};
if ( $p and $c) {
#my $type = $ppctab->getNodeAttribs($c, ["nodetype"]);
my $type = getnodetype($c);
#if ( $type and ($type->{nodetype} eq 'fsp') or ($type->{nodetype} eq 'bpa'))
if ( $type eq 'fsp' or $type eq 'bpa')
{
push @{$::PARENT_CHILDREN{$p}}, $c;
}
}
if ($t) { # the nodetype exists in the ppc table, use it
if ( $t eq 'fsp' or $t eq 'bpa') {
# build hash of ppc.parent -> ppc.node
push @{$PPCHASH{$p}}, $c;
}
} else { # go look in the nodetype table to find nodetype
my $type = getnodetype($c);
if ( $type eq 'fsp' or $type eq 'bpa')
{
# build hash of ppc.parent -> ppc.node
push @{$PPCHASH{$p}}, $c;
}
}
} # not $p and $c
}
foreach (@{$::PARENT_CHILDREN{$parent}}) {
# Find parent in the hash and build return values
foreach (@{$PPCHASH{$parent}}) {
push @children, $_;
}
} else {
if (exists($::PARENT_CHILDREN{$parent})) {
foreach (@{$::PARENT_CHILDREN{$parent}}) {
if (exists($PPCHASH{$parent})) {
foreach (@{$PPCHASH{$parent}}) {
push @children, $_;
}
}
}
# if port not input
if ( !defined($port ))
{
return \@children;
} else
{
my $vpdtab = xCAT::Table->new( 'vpd' );
my $sides = $vpdtab->getNodesAttribs(\@children, ['side']);
if(!$sides)
{
} else {
if (@children) {
my $vpdtab = xCAT::Table->new( 'vpd' );
unless ($vpdtab) { # cannot open the table return with error
xCAT::MsgUtils->message('S', "getchildren:Unable to open vpd table.\n");
$::RUNCMD_RC = 1;
return undef;
}
my $sides = $vpdtab->getNodesAttribs(\@children, ['side']);
if(!$sides)
{
return undef;
}
for my $n (@children)
{
}
foreach my $n (@children)
{
my $nside = $sides->{$n}->[0];
if ($nside->{side} =~ /$port/)
{
push @children_prot, $n;
push @children_port, $n;
}
}
return \@children_prot;
return \@children_port;
} else { # no children
return undef;
}
}
}
#-------------------------------------------------------------------------------
=head3 getnodetype
returns nodetype,
first requery ppc table, if not exist, requery nodetypetable
if the input is a array it will return a refrence,
if the input is a simple node,it will return its type value
if the value in the talbe is null, it will be undef but not ''
Query ppc table, if no type found query nodetype table
Arguments:
none
An array of nodenames or 1 nodename
Returns:
type of node
Globals:
%::GLOBLE_NODE_TYPE
%NODETYPEHASH
Error:
none
$::RUNCMD_RC = 1;
Errors written to syslog
Example:
$type = getnodetype($node);
$typerefer = getnodetype(\@nodes);
@@ -2172,6 +2198,7 @@ sub getchildren
=cut
#-------------------------------------------------------------------------------
my %NODETYPEHASH;
sub getnodetype
{
my $nodes = shift;
@@ -2180,60 +2207,64 @@ sub getnodetype
$nodes = shift;
}
my $rsp;
my @tabletype = qw(ppc zvm);
$::RUNCMD_RC = 0;
my $nodetypetab = xCAT::Table->new( 'nodetype' );
if ( !$nodetypetab )
{
$rsp->{data}->[0] = "Could not open the nodetype table.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
unless ($nodetypetab) { # cannot open the table return with error
xCAT::MsgUtils->
message('S', "getnodetype:Unable to open nodetype table.\n");
$::RUNCMD_RC = 1;
return undef;
}
my @types = ();
my $typep;
my $type;
my %typehash;
if ( $nodes =~ /^ARRAY/) {
my @nodetypes = $nodetypetab->getAllAttribs('node','nodetype');
for my $tn( @nodetypes ) {
$typehash{ $tn->{'node'} } = $tn->{'nodetype'};
}
for my $nn (@$nodes) {
$type = $typehash{$nn};
if ($type) {
my $flag = 0;
my @tablename;
for my $tt ( split /,/, $type ) {
if ( grep(/$tt/, @tabletype)) {
@tablename = grep(/$tt/, @tabletype);
$flag = 1;
next;
}
if (!%NODETYPEHASH) {
my @nodetypes = $nodetypetab->getAllNodeAttribs(['node','nodetype']);
foreach my $tn (@nodetypes) {
$NODETYPEHASH{ $tn->{'node'} } = $tn->{'nodetype'};
}
}
foreach my $nn (@$nodes) {
$type = $NODETYPEHASH{$nn};
if ($type) {
my $flag = 0;
my @tablename;
foreach my $tt (split /,/, $type) {
if (grep(/$tt/, @tabletype)) {
@tablename = grep(/$tt/, @tabletype);
$flag = 1;
next;
}
}
unless ($flag) { # find type in nodetype table
push (@types, $type);
} else { # use table (ppc or zvm) from attribute
my $tablehandler = xCAT::Table->new( $tablename[0] );
unless ($tablehandler) { # cannot open
xCAT::MsgUtils->
message('S', "getnodetype:Unable to open $tablename[0] table.\n");
$::RUNCMD_RC = 1;
return undef;
}
unless ($flag) { # find type in nodetype table
push (@types, $type);
# read the table
$typep = $tablehandler->getNodeAttribs($nn, ["nodetype"]);
if ($typep and $typep->{nodetype}) {
$type = $typep->{nodetype};
push (@types, $type);
} else {
my $tablehandler = xCAT::Table->new( $tablename[0] );
if ( !$tablehandler ) {
$rsp->{data}->[0] = "Could not open the $tablename[0] table.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
push (@types, undef);
next;
}
$typep = $tablehandler->getNodeAttribs($nn, ["nodetype"]); # find type in ppc table
if ($typep and $typep->{nodetype}) {
$type = $typep->{nodetype};
push (@types, $type);
} else {
push (@types, undef);
}
}
} else {
push (@types, undef);
}
push (@types, undef);
}
} # end of processing PPC
} else {
push (@types, undef);
}
}
return \@types;
} else {
} else { # for one node
$typep = $nodetypetab->getNodeAttribs($nodes, ["nodetype"]);
if ( $typep and $typep->{nodetype} ) {
$type = $typep->{nodetype};
@@ -2251,9 +2282,9 @@ sub getnodetype
} else { # find type in ppc table
my $tablehandler = xCAT::Table->new( $tablename[0] );
if ( !$tablehandler ) {
$rsp->{data}->[0] = "Could not open the $tablename[0] table.";
xCAT::MsgUtils->message("E", $rsp, $::callback);
return undef;
xCAT::MsgUtils->message('S', "getnodetype:Unable to open $tablename[0] table.\n");
$::RUNCMD_RC = 1;
return undef;
}
$typep = $tablehandler->getNodeAttribs($nodes, ["nodetype"]);
if ( $typep and $typep->{nodetype} ) {
@@ -2275,18 +2306,19 @@ sub getnodetype
Arguments:
frame name
Returns:
refrence of cec hostnames
Array of cec hostnames
Globals:
$::PARENT_CHILDREN_CEC
%PARENT_CHILDREN_CEC
Error:
none
Example:
$c1 = getcecchildren($nodetocheck);
@frame_members = getcecchildren($frame);
Comments:
none
=cut
#-------------------------------------------------------------------------------
my %PARENT_CHILDREN_CEC;
sub getcecchildren
{
my $parent = shift;
@@ -2295,33 +2327,46 @@ sub getcecchildren
$parent = shift;
}
my @children = ();
if (!%::PARENT_CHILDREN_CEC) {
if (!%PARENT_CHILDREN_CEC) {
my $ppctab = xCAT::Table->new( 'ppc' );
unless ($ppctab) { # cannot open the table return with error
xCAT::MsgUtils->message('S', "getcecchildren:Unable to open ppc table.\n");
$::RUNCMD_RC = 1;
return undef;
}
if ($ppctab)
{
my @ps = $ppctab->getAllNodeAttribs(['node','parent']);
for my $entry ( @ps ) {
my @ps = $ppctab->getAllNodeAttribs(['node','parent','nodetype']);
foreach my $entry ( @ps ) {
my $p = $entry->{parent};
my $c = $entry->{node};
my $t = $entry->{nodetype};
if ( $p and $c) {
#my $type = $ppctab->getNodeAttribs($c, ["nodetype"]);
my $type = getnodetype($c);
if ( $type eq 'cec') {
push @{$::PARENT_CHILDREN_CEC{$p}}, $c;
}
if ($t) { # the nodetype exists in the ppc table, use it
if ( $t eq 'cec') {
# build hash of ppc.parent -> ppc.node
push @{$PARENT_CHILDREN_CEC{$p}}, $c;
}
} else { # go look in the nodetype table to find nodetype
my $type = getnodetype($c);
if ( $type eq 'cec') {
push @{$PARENT_CHILDREN_CEC{$p}}, $c;
}
}
}
}
foreach (@{$::PARENT_CHILDREN_CEC{$parent}}) {
}
# find a match for the parent and build the return array
foreach (@{$PARENT_CHILDREN_CEC{$parent}}) {
push @children, $_;
}
return \@children;
return \@children;
}
} else {
if (exists($::PARENT_CHILDREN_CEC{$parent})) {
foreach (@{$::PARENT_CHILDREN_CEC{$parent}}) {
} else { # already built the HASH
if (exists($PARENT_CHILDREN_CEC{$parent})) {
foreach (@{$PARENT_CHILDREN_CEC{$parent}}) {
push @children, $_;
}
return \@children;
return \@children;
}
}
return undef;
+5 -5
View File
@@ -4257,8 +4257,8 @@ sub parse_and_run_dcp
/.../file1 /..../filex -> /...../dir1
rsync command format
/usr/bin/rsync -Lpotz /etc/services $pathtoimage/etc/services
/usr/bin/rsync -Lpotz /tmp/lissa/file1 /tmp/lissa/file $pathtoimage/tmp/lissa
/usr/bin/rsync -Lprgotz /etc/services $pathtoimage/etc/services
/usr/bin/rsync -Lprgotz /tmp/lissa/file1 /tmp/lissa/file $pathtoimage/tmp/lissa
Arguments:
Input:
@@ -4344,16 +4344,16 @@ sub rsync_to_image
{
if (-e ("/usr/bin/rsync"))
{
$synccmd = "/usr/bin/rsync -Lpotz ";
$synccmd = "/usr/bin/rsync -Lprogtz ";
}
else
{
$synccmd = "/usr/local/bin/rsync -Lpotz ";
$synccmd = "/usr/local/bin/rsync -Lprogtz ";
}
}
else # linux
{
$synccmd = "/usr/bin/rsync -Lpotz ";
$synccmd = "/usr/bin/rsync -Lprogtz ";
}
my $syncopt = "";
foreach my $srcfile (@srcfiles)
+17 -10
View File
@@ -98,10 +98,12 @@ sub fsp_api_action {
############################
# Get IP address
############################
$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name, $parameter );
#$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name, $parameter );
$fsp_ip = xCAT::Utils::getIPaddress( $fsp_name, $parameter );
undef($parameter);
} else {
$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name );
#$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name );
$fsp_ip = xCAT::Utils::getIPaddress( $fsp_name );
}
if(!defined($fsp_ip)) {
@@ -144,8 +146,8 @@ sub fsp_api_action {
my $cmd;
my $install_dir = xCAT::Utils->getInstallDir();
if( $action =~ /^code_update$/) {
$cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name: -d $install_dir/packages_fw/";
if( $action =~ /^(code_update|get_compatible_version_from_rpm)$/) {
$cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter -d $install_dir/packages_fw/";
} elsif($action =~ /^add_connection$/) {
$cmd = "$fsp_api -a $action -u $user -p $password -T $tooltype -t $type:$fsp_ip:$id:$node_name:";
} elsif ($action =~ /^set_frame_number$/) {
@@ -154,6 +156,9 @@ sub fsp_api_action {
if( defined($parameter) ) {
if ($action =~ /^set_(frame|cec|lpar)_name$/) {
$cmd = "$fsp_api -a $action -n $parameter -T $tooltype -t $type:$fsp_ip:$id:$node_name:";
} elsif( $parameter !=0 && $action =~ /^(on|reset)$/ ) {
#powerinterval for lpars power on
$cmd = "$fsp_api -a $action -i $parameter -T $tooltype -t $type:$fsp_ip:$id:$node_name:";
} else {
$cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter";
}
@@ -173,7 +178,7 @@ sub fsp_api_action {
#################
#$outhash{ $node_name } = $res;
if(defined($res)) {
$res =~ s/$node_name: //;
$res =~ s/$node_name: //g;
}
return( [$node_name,$res, $Rc] );
}
@@ -234,8 +239,9 @@ sub fsp_state_action {
############################
# Get IP address
############################
$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name );
if(!defined($fsp_ip)) {
#$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name );
$fsp_ip = xCAT::Utils::getIPaddress( $fsp_name );
if(!defined($fsp_ip) or ($fsp_ip == -3)) {
$res[0] = ["Failed to get the $fsp_name\'s ip"];
return ([-1, @res]);
}
@@ -256,7 +262,7 @@ sub fsp_state_action {
#################
#$outhash{ $node_name } = $res;
if( @res ) {
$res[0] =~ s/$node_name: //;
$res[0] =~ s/$node_name: //g;
}
return( [$Rc,@res] );
}
@@ -351,8 +357,9 @@ sub fsp_api_create_parttion {
############################
# Get IP address
############################
$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name );
if(!defined($fsp_ip)) {
#$fsp_ip = xCAT::Utils::getNodeIPaddress( $fsp_name );
$fsp_ip = xCAT::Utils::getIPaddress( $fsp_name );
if(!defined($fsp_ip) or ($fsp_ip == -3)) {
$res = "Failed to get the $fsp_name\'s ip";
return ([$fsp_name, $res, -1]);
}
+62 -53
View File
@@ -31,8 +31,9 @@ sub do_rnetboot {
my $ssh = @$exp[0];
my $userid = @$exp[4];
my $pw = @$exp[5];
my $result = "";
my $Rc = SUCCESS;
my $cmd;
my $result;
#######################################
# Disconnect Expect session
@@ -97,68 +98,76 @@ sub do_rnetboot {
}
}
my $mac = lc($opt->{m});
#######################################
# Network specified
#######################################
$cmd.= " -s auto -d auto -m \"$mac\" -S $opt->{S} -G $opt->{G} -C $opt->{C}";
if ( exists( $opt->{o} )) {
$cmd.= " -o";
}
my @macs = split /\|/, $opt->{m};
foreach my $mac ( @macs ) {
$mac = lc($mac);
#######################################
# Network specified
#######################################
$cmd.= " -s auto -d auto -m \"$mac\" -S $opt->{S} -G $opt->{G} -C $opt->{C}";
if ( exists( $opt->{o} )) {
$cmd.= " -o";
}
my %client_nethash = xCAT::DBobjUtils->getNetwkInfo( [$node] );
if ( grep /hf/, $client_nethash{$node}{mgtifname} ) {
$cmd.= " -t hfi-ent";
} else {
$cmd.= " -t ent";
}
my %client_nethash = xCAT::DBobjUtils->getNetwkInfo( [$node] );
if ( grep /hf/, $client_nethash{$node}{mgtifname} ) {
$cmd.= " -t hfi-ent";
} else {
$cmd.= " -t ent";
}
$pprofile = "not_use"; #lpar_netboot.expect need pprofile for p5 & p6, but for p7 ih, we don't use this attribute.
#######################################
# Add command options
#######################################
$cmd.= " -f \"$name\" \"$pprofile\" \"$fsp\" $id $hcp \"$node\"";
print "cmd: $cmd\n";
my $done = 0;
my $Rc = SUCCESS;
while ( $done < 2 ) {
#######################################
# Execute command
#######################################
print "cmd:$cmd\n";
my $pid = open( OUTPUT, "$cmd 2>&1 |");
$SIG{INT} = $SIG{TERM} = sub { #prepare to process job termination and propogate it down
kill 9, $pid;
return( [RC_ERROR,"Received INT or TERM signal"] );
};
if ( !$pid ) {
return( [RC_ERROR,"$cmd fork error: $!"] );
}
#######################################
# Get command output
#######################################
while ( <OUTPUT> ) {
$result.=$_;
}
close OUTPUT;
$pprofile = "not_use"; #lpar_netboot.expect need pprofile for p5 & p6, but for p7 ih, we don't use this attribute.
#######################################
# Get command exit code
# Add command options
#######################################
$cmd.= " -f \"$name\" \"$pprofile\" \"$fsp\" $id $hcp \"$node\"";
print "cmd: $cmd\n";
my $done = 0;
while ( $done < 2 ) {
$result = "";
$Rc = SUCCESS;
#######################################
# Execute command
#######################################
print "cmd:$cmd\n";
my $pid = open( OUTPUT, "$cmd 2>&1 |");
$SIG{INT} = $SIG{TERM} = sub { #prepare to process job termination and propogate it down
kill 9, $pid;
return( [RC_ERROR,"Received INT or TERM signal"] );
};
if ( !$pid ) {
return( [RC_ERROR,"$cmd fork error: $!"] );
}
#######################################
# Get command output
#######################################
while ( <OUTPUT> ) {
$result.=$_;
}
close OUTPUT;
#######################################
# Get command exit code
#######################################
foreach ( split /\n/, $result ) {
if ( /^lpar_netboot / ) {
$Rc = RC_ERROR;
last;
foreach ( split /\n/, $result ) {
if ( /^lpar_netboot / ) {
$Rc = RC_ERROR;
last;
}
}
if ( $Rc == SUCCESS ) {
$done = 2;
} else {
$done = $done + 1;
sleep 1;
}
}
if ( $Rc == SUCCESS ) {
$done = 2;
} else {
$done = $done + 1;
sleep 1;
last;
}
}
return( [$Rc,$result] );
+19 -12
View File
@@ -34,9 +34,9 @@ sub parse_args {
# Process command-line arguments
#############################################
if ( !defined( $args )) {
$request->{method} = $cmd;
return( \%opt );
return(usage( "Missing command with rbootseq in DFM, net or hfi ?" ));
}
#############################################
# Checks case in GetOptions, allows opts
# to be grouped (e.g. -vx), and terminates
@@ -156,11 +156,12 @@ sub rbootseq {
my $m;
my $m_t;
foreach $m (@mac_t) {
if($m =~ /([\w:]{14})!$node_name/) {
if(($m =~ /([\w:]{12})!$node_name/) || ($m =~ /([\w:]{17})!$node_name/)) {
$m_t = $1;
last;
}
}
}
}
if( !defined($m_t)) {
$mac = $mac_t[0];
@@ -168,12 +169,18 @@ sub rbootseq {
$mac = $m_t;
}
}
if( $mac =~ /\:/) {
$mac =~ s/\://g;
}
if( $mac =~ /\:/) {
$mac =~ s/\://g;
}
$parameter = "mac=$mac:speed=auto,duplex=auto,$o->{server},,$o->{client},$o->{gateway},$bootp_retries,$tftp_retries,$o->{netmask},$blksize";
if($mac =~/^(\w{12})$/) {
$parameter = "mac=$mac:speed=auto,duplex=auto,$o->{server},,$o->{client},$o->{gateway},$bootp_retries,$tftp_retries,$o->{netmask},$blksize";
} else {
push @output, [$node_name, "The mac address in mac table could NOT be used for rbootseq with -net. HFI mac , or other wrong format?", -1 ];
return( \@output );
}
}
if( $opt->{hfi}) {
@@ -193,9 +200,9 @@ sub rbootseq {
##################################
if ( $Rc != SUCCESS ) {
push @output, [$node_name,$data,$Rc];
next;
}
} else {
push @output,[$node_name, "Success", 0];
}
return( \@output );
+177 -62
View File
@@ -27,6 +27,40 @@ my %default_passwd = (
##########################################################################
# Parse the command line for options and operands
##########################################################################
sub array_to_string {
my $array = shift;
my $string = "";
my $i = 0;
if (!scalar(@$array)) {
return undef;
}
$string .= "\'$array->[0]\'";
for ($i = 1; $i < scalar(@$array) - 1; $i++) {
$string .= ", ";
$string .= "\'$array->[$i]\'";
}
if ($i < scalar(@$array)) {
$string .= " or \'$array->[$i]\'";
}
return $string;
}
sub check_command {
my $cmd = shift;
my $rsp = shift;
my @type = ();
foreach my $tmp_type (keys %$rsp) {
if (grep (/^$cmd$/, @{$rsp->{$tmp_type}})) {
push @type, $tmp_type;
}
}
if (!scalar(@type)) {
return undef;
} else {
return &array_to_string(\@type);
}
}
sub parse_args {
my $request = shift;
@@ -57,7 +91,11 @@ sub parse_args {
"cec_off_policy",
"resetnet",
"sysname",
"pending_power_on_side"
"pending_power_on_side",
"BSR",
"setup_failover",
"force_failover",
"huge_page"
);
my @frame = (
"frame",
@@ -143,26 +181,49 @@ sub parse_args {
####################################
# Check for unsupported commands
####################################
foreach my $arg ( @ARGV ) {
my @arg_array = @ARGV;
my @fsp_cmds = ();
my @ppc_cmds = ();
foreach my $arg ( @arg_array ) {
my ($command,$value) = split( /=/, $arg );
if ( !grep( /^$command$/, @$supported) and !$opt{resetnet}) {
my @enableASMI = xCAT::Utils->get_site_attribute("enableASMI");
if (defined($enableASMI[0])) {
$enableASMI[0] =~ tr/a-z/A-Z/; # convert to upper
if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES"))
{
$request->{enableASMI} = 1;
return xCAT::PPCcfg::parse_args($request, @_);
}
}
return(usage( "Invalid command for $request->{hwtype} : $arg" ));
}
$request->{arg} = [$arg];
my $res = xCAT::PPCcfg::parse_args($request, @_);
if (ref($res) eq 'ARRAY') {
my $check_cmd = &check_command($command, \%rsp);
if (!defined($check_cmd)) {
return $res;
} else {
return ([$_[0], "'$command' is only supported by type $check_cmd."]);
}
} else {
push @ppc_cmds, $command;
}
} else {
push @fsp_cmds, $command;
}
if ( exists( $cmds{$command} )) {
return(usage( "Command multiple times: $command" ));
}
$cmds{$command} = $value;
}
$request->{arg} = \@arg_array;
if (scalar(@fsp_cmds) && scalar(@ppc_cmds)) {
my $fsp_cmds_string = &array_to_string(\@fsp_cmds);
my $ppc_cmds_string = &array_to_string(\@ppc_cmds);
return (usage("Invalid command array: $fsp_cmds_string can not execute with $ppc_cmds_string."));
} elsif(scalar(@ppc_cmds)) {
my @enableASMI = xCAT::Utils->get_site_attribute("enableASMI");
if (defined($enableASMI[0])) {
$enableASMI[0] =~ tr/a-z/A-Z/; # convert to upper
if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) {
$request->{enableASMI} = 1;
}
}
if ($request->{enableASMI} ne '1') {
return (usage( "You should enable \"ASMI\" first for \'$command\'."));
}
}
####################################
# Check command arguments
####################################
@@ -172,6 +233,8 @@ sub parse_args {
if ( $result ) {
return( usage($result) );
}
} elsif ($_ =~ /_passwd$/) {
return( usage("No argument specified for '$_'"));
}
}
####################################
@@ -198,7 +261,8 @@ sub parse_args {
$request->{method} = "resetnet";
return( \%opt );
}
if(exists($cmds{sysname}) or exists($cmds{pending_power_on_side})) {
if(exists($cmds{sysname}) or exists($cmds{pending_power_on_side}) or exists($cmds{BSR})
or exists($cmds{setup_failover}) or exists($cmds{force_failover}) or exists ($cmds{huge_page})) {
$request->{hcp} = $request->{hwtype} eq 'frame' ? "bpa":"fsp";
$request->{method} = "do_fspapi_function";
return (\%opt);
@@ -273,6 +337,19 @@ sub parse_option {
return ("Invalid pending_power_on_side param '$value'");
}
}
if ($command eq 'setup_failover') {
if ($value !~ /^(enable|disable)$/) {
return ("Invalid setup_failover param '$value'");
}
}
if ($command =~ /^(BSR|force_failover)$/ ) {
return ("BSR value can not be set");
}
if ($command =~ /^huge_page$/) {
if ($value !~ /^[0-9]+$/) {
return ("Invalid huge page param '$value'");
}
}
return undef;
}
sub check_node_info {
@@ -291,24 +368,50 @@ sub check_node_info {
my %fspapi_action = (
sysname => {
query => {
cec => "get_cec_name",
frame => "get_frame_name"
},
set => {
cec => "set_cec_name",
frame => "set_frame_name"
}
query => {
cec => "get_cec_name",
frame => "get_frame_name"
},
set => {
cec => "set_cec_name",
frame => "set_frame_name"
}
},
pending_power_on_side => {
query => {
cec => "list_firmware_level",
frame => "list_firmware_level"
query => {
cec => "list_firmware_level",
frame => "list_firmware_level"
},
set => {
cec => "set_ipl_param",
frame => "set_ipl_param"
}
},
set => {
cec => "set_ipl_param",
frame => "set_ipl_param"
}
BSR => {
query => {
cec => "get_cec_bsr"
}
},
setup_failover => {
query => {
cec => "cec_setup_failover"
},
set => {
cec => "cec_setup_failover"
}
},
force_failover => {
query => {
cec => "cec_force_failover"
}
},
huge_page => {
query => {
cec => "get_huge_page"
},
set => {
cec => "set_huge_page"
}
}
);
sub do_process_query_res {
@@ -316,26 +419,29 @@ sub do_process_query_res {
my $cmd = shift;
my $result = shift;
my $res = shift;
if (@$res[2] != 0) {
push @$result, $res;
return "Error";
}
if ($cmd =~ /^sysname$/) {
push @$result, $res;
if (@$res[2] != 0) {
return "Error";
}
} elsif($cmd =~ /^pending_power_on_side$/) {
if (@$res[2] != 0) {
push @$result, $res;
return "Error";
} else {
my @values = split(/\n/, @$res[1]);
foreach my $v (@values) {
if ($v =~ /pend_power_on_side_(\w+)=(temp|perm),/) {
push @$result, [$name, "Pending Power On Side \L\u$1: $2", '0'];
} else {
push @$result, [$name, $v, '1'];
return "Error";
}
} elsif ($cmd =~ /^pending_power_on_side$/) {
my @values = split(/\n/, @$res[1]);
foreach my $v (@values) {
if ($v =~ /pend_power_on_side_(\w+)=(temp|perm),/) {
push @$result, [$name, "Pending Power On Side \L\u$1: $2", '0'];
} else {
push @$result, [$name, $v, '1'];
return "Error";
}
}
} elsif ($cmd =~ /^(BSR|huge_page)$/) {
my @values = split(/\n/, @$res[1]);
foreach my $v (@values) {
push @$result, [$name, $v, '0'];
}
} else {
push @$result, $res;
}
return undef;
}
@@ -348,10 +454,11 @@ sub do_query {
while (my($name, $d) = each(%$h)) {
my $action = $fspapi_action{$cmd}{query}{@$d[4]};
my $values = xCAT::FSPUtils::fsp_api_action($name, $d, $action);
my $res = &do_process_query_res($name, $cmd, \@result, $values);
if (defined($res)) {
last;
}
&do_process_query_res($name, $cmd, \@result, $values);
#my $res = &do_process_query_res($name, $cmd, \@result, $values);
#if (defined($res)) {
# last;
#}
}
}
return (\@result);
@@ -364,6 +471,10 @@ sub do_set_get_para {
return (($value eq '*') ? $node_name : $value);
} elsif ($cmd =~ /^pending_power_on_side$/){
return ($value =~ /^perm$/) ? '0' : '1';
} elsif ($cmd =~ /^setup_failover$/) {
return ($value =~ /^enable$/) ? '1' : '0';
} else {
return $value;
}
}
@@ -391,10 +502,11 @@ sub do_set {
my $para = &do_set_get_para($name, $cmd, $value);
my $values = xCAT::FSPUtils::fsp_api_action($name, $d, $action, 0, $para);
# print Dumper($values);
my $res = &do_process_set_res($name, $cmd, \@result, $values);
if (defined($res)) {
last;
}
&do_process_set_res($name, $cmd, \@result, $values);
#my $res = &do_process_set_res($name, $cmd, \@result, $values);
#if (defined($res)) {
# last;
#}
}
}
return (\@result);
@@ -406,14 +518,16 @@ sub do_fspapi_function {
my @ret = ();
my $res;
my $args = $request->{arg};
my @fspapi_array = qw/sysname pending_power_on_side BSR setup_failover force_failover huge_page/;
my $invalid_node = &check_node_info($hash);
if (defined($invalid_node)) {
return ([[$invalid_node, "Node must be CEC or Frame", '1']]);
}
foreach my $arg (@$args) {
my ($cmd, $value) = split /=/, $arg;
if ($cmd !~ /^(sysname|pending_power_on_side)$/) {
return ([["Error", "'$cmd' can not execute with 'sysname' or 'pending_power_on_side'", '1']]);
if (!grep(/^$cmd$/, @fspapi_array)) {
my $fspapi_array_string = &array_to_string(\@fspapi_array);
return ([["Error", "'$cmd' can not execute with $fspapi_array_string", '1']]);
}
if ($value) {
$res = &do_set($request, $hash, $cmd, $value)
@@ -556,8 +670,8 @@ sub frame {
#################################
# Return error
#################################
if ( $Rc != 0 ) {
return( [[$node,@$data[1],$Rc]] );
if ( $Rc != 0 || @$data[1] =~ /Error/ ) {
return( [[$node,"@$data[1]. If just set the frame number, please wait for 5-10 minutes. Otherwise, maybe other problems cause this failure.",$Rc]] );
}
push @$result, [$node,@$data[1], 0];
@@ -592,7 +706,7 @@ sub frame {
}
push @$result, [$node,@$data[1], 0];
push @$result, [$node,"It will take several minutes to complete. So please wait for several minutes, then the other operations could be done. Otherwise, the other operation will fail.", 0];
push @$result, [$node,"It will take several minutes to complete. So please wait for 5-10 minutes, then the other operations could be done. Otherwise, the other operation will fail.", 0];
} else {
#################################
@@ -735,9 +849,10 @@ sub fsp_api_passwd {
# Get IP address
############################
#$fsp_ip = xCAT::Utils::get_hdwr_ip($fsp_name);
$fsp_ip = xCAT::Utils::getNodeIPaddress($fsp_name);
if($fsp_ip == -1) {
$res = "Failed to get the $fsp_name\'s ip";
#$fsp_ip = xCAT::Utils::getNodeIPaddress($fsp_name);
$fsp_ip = xCAT::Utils::getIPaddress($fsp_name);
if(!defined($fsp_ip) or ($fsp_ip == -3)) {
$res = "Failed to get IP address for $fsp_name.";
return ([$node_name, $res, -1]);
}
+14 -8
View File
@@ -221,10 +221,8 @@ sub mkhwconn_parse_args
if( ! exists $opt{port} )
{
$opt{port} = "0";
}
if( $opt{port} ne "0" and $opt{port} ne "1")
$opt{port} = "[0|1]";
} elsif( $opt{port} ne "0" and $opt{port} ne "1")
{
return( usage('Wrong value of --port option. The value can be 0 or 1, and the default value is 0.'));
}
@@ -232,7 +230,11 @@ sub mkhwconn_parse_args
$ppctab->close();
#$nodetypetab->close();
$vpdtab->close();
if ( scalar( @ARGV)) {
return(usage( "No additional flag is support by this command" ));
}
$request->{method} = 'mkhwconn';
return( \%opt);
}
@@ -608,11 +610,11 @@ sub lshwconn
# push @value, [$node_name, $values, $Rc];
# next;
# }
my %rec = ();
my @data_a = split("\n", $values);
foreach my $data(@data_a) {
if( $data =~ /state/) {
$data =~ /state=([\w\s\,]+), type=([\w-]+), MTMS=([\w-\*]+), ([\w=]+), slot=([\w]+), ipadd=([\w.]+), alt_ipadd=([\w.]+)/ ;
$data =~ /state=([\w\s\,]+), type=([\w-]+), MTMS=([\w-\*\#]+), ([\w=]+), slot=([\w]+), ipadd=([\w.]+), alt_ipadd=([\w.]+)/ ;
#$data =~ /state=([\w\s]+),\(type=([\w-]+)\),\(serial-number=([\w]+)\),\(machinetype-model=([\w-]+)\),sp=([\w]+),\(ip-address=([\w.]+),([\w.]+)\)/ ;
print "parsing: $1,$2,$3,$4,$5,$6,$7\n";
my $state = $1;
@@ -622,7 +624,11 @@ sub lshwconn
my $slot = $5;
my $ipadd = $6;
my $alt_ipaddr = $7;
$data = "$ipadd: $sp,ipadd=$ipadd,alt_ipadd=$alt_ipaddr,state=$state";
if (exists($rec{$slot})) {
next;
}
$rec{$slot} = 1;
$data = "$sp,ipadd=$ipadd,alt_ipadd=$alt_ipaddr,state=$state";
}
push @value, [$node_name, $data, $Rc];
}
+98 -310
View File
@@ -2,6 +2,7 @@
package xCAT::FSPflash;
use strict;
use lib "/opt/xcat/lib/perl";
use Getopt::Long;
use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR);
use xCAT::Usage;
@@ -13,15 +14,10 @@ use File::Spec;
use xCAT::PPCrflash;
#use Data::Dumper;
use xCAT::FSPUtils;
use xCAT::FSPinv;
use POSIX "WNOHANG";
use Storable qw(freeze thaw);
use Thread qw(yield);
my $packages_dir= ();
my $activate = ();
my $verbose = 0;
$::POWER_DEST_DIR = "/tmp";
my $release_level;
my $active_level;
my @dirlist;
@@ -172,180 +168,6 @@ sub get_lic_filenames {
}
sub get_one_mtms {
my $exp = shift;
my $bpa = shift;
my $cmd = "lssyscfg -r cage -e $bpa";
my $mtms;
my $msg;
my $values = xCAT::PPCcli::send_cmd( $exp, $cmd );
my $Rc = shift(@$values);
#####################################
# Return error
#####################################
if ( $Rc != SUCCESS ) {
$msg = "ERROR: Failed to find a CEC managed by $bpa on the HMC";
return ("", $msg);
}
foreach (@$values) {
if( $_ =~ /cage_num=(\w*),contents=sys,type_model_serial_num=(\w+)-(\w+)\*(\w+),loc_code=(\w+).(\w+).(\w+)/) {
$mtms = "$2-$3*$4";
last;
}
}
#print "the managed system is $mtms!\n";
return ($mtms, $msg);
}
sub process_node {
my $req = shift;
my $node = shift;
my $tab = xCAT::Table->new("vpd");
my $msg;
unless ($tab) {
$msg = "ERROR: Unable to open basic ppc table for configuration";
return ("", $msg);
}
print "in process_node1, node $node\n";
#print Dumper($node);
my $ent = $tab->getNodeAttribs($node, ['serial', 'mtm']);
#print "in process_node\n";
#print Dumper($ent);
my $serial = $ent->{'serial'};
my $mtm = $ent->{'mtm'};
#################################
#Get node
#################################
#print "in get_related_fsp_bpa(), serial = $serial, mtm= $mtm\n";
my @ents = $tab->getAllAttribsWhere("serial=\"$serial\" and mtm=\"$mtm\"", 'node');
if (@ents < 0) {
$msg = "failed to get the FSPs or BPAs whose mtm is $mtm, serial is $serial!";
return ("", $msg);
}
my $e;
#print Dumper(@ents);
foreach $e (@ents) {
if($e->{node} ne $node) {
# push @{$req->{node}},$e->{node};
push @{$req->{noderange}},$e->{node};
}
}
}
sub get_related_fsp_bpa {
my $mtm = shift;
my $serial = shift;
my $tab = xCAT::Table->new("vpd");
my $msg;
unless ($tab) {
$msg = "ERROR: Unable to open basic ppc table for configuration";
return ("", $msg);
}
#################################
#Get node
#################################
print "in get_related_fsp_bpa(), serial = $serial, mtm= $mtm\n";
my @ent = $tab->getAllAttribsWhere("\"serial\" like '%".$serial."%' and \"mtm\" like '%".$mtm."%'", 'node');
if (@ent < 0) {
$msg = "failed to get the FSPs or BPAs whose mtm is $mtm, serial is $serial!";
return ("", $msg);
}
return(\@ent);
}
sub get_hcp_id {
my $node = shift;
my $tab = xCAT::Table->new("ppc");
my $msg;
unless ($tab) {
$msg = "ERROR: Unable to open basic ppc table for configuration";
return ("", $msg);
}
#################################
#Get node
#################################
my @ent = $tab->getNodeAttribs($node, ['hcp', 'id']);
if (@ent < 0) {
$msg = "failed to get the hcp and id of $node!";
return ("", $msg);
}
return($ent[0]->{hcp}, $ent[0]->{id});
}
##########################################################################
# Forks a process to run the action command
##########################################################################
sub fork_cmd {
my $node_name = shift;
my $attrs = shift;
my $action = shift;
my $pipe ;
#######################################
# Pipe childs output back to parent
#######################################
my $parent;
my $child;
pipe $parent, $child;
my $pid = xCAT::Utils->xfork;
my $res;
if ( !defined($pid) ) {
###################################
# Fork error
###################################
print "Fork error:!";
return undef;
}
elsif ( $pid == 0 ) {
###################################
# Child process
###################################
close( $parent );
$pipe = $child;
$res = xCAT::FSPUtils::fsp_api_action( $node_name, $attrs, $action );
#print "res\n";
#print Dumper($res);
my %output;
$output{node} = $node_name;
$output{ret} = @$res[2];
$output{contents} = @$res[1];
# print $pipe %output;
# print $pipe freeze(\%output);
my @outhash;
push @outhash,\%output;
print $pipe freeze([@outhash]);
# print $pipe "good";
print $pipe "\nENDOFFREEZE6sK4ci\n";
exit(0);
}
else {
###################################
# Parent process
###################################
close( $child );
return( $parent, $pid );
}
return(0);
}
##########################
#Performs Licensed Internal Code (LIC) update support for HMC-attached POWER5 and POWER6 Systems
@@ -423,144 +245,111 @@ sub rflash {
if($flag2 > 1) {
last;
}
my $values = xCAT::FSPUtils::fsp_api_action( $name, $d, "list_firmware_level");
# my $level = xCAT::PPCcli::lslic( $exp, $d, $timeout );
my $Rc = @$values[2];
my $level = @$values[1];
#####################################
# Return error
#####################################
if ( $Rc != SUCCESS ) {
push @value, [$name,$level,$Rc];
next;
}
if( !defined($housekeeping) && ($$d[4] =~ /^fsp$/ || $$d[4] =~ /^lpar$/ || $$d[4] =~ /^cec$/)) {
$action = "get_compatible_version_from_rpm";
my $values = xCAT::FSPUtils::fsp_api_action( $name, $d, $action, 0, $request->{opt}->{d} );
my $Rc = @$values[2];
my $v = @$values[1];
if ($Rc != 0) {
push @value, [$name, $v, -1];
return (\@value);
}
#if( $v !~ "nocheckversion") {
my @levels = split(/,/, $v);
my $frame = $$d[5];
if ( $frame ne $name ) {
my @frame_d = (0, 0, 0, $frame, "frame", 0);
$action = "list_firmware_level";
$values = xCAT::FSPUtils::fsp_api_action( $frame, \@frame_d, $action );
$Rc = @$values[2];
my $frame_firmware_level = @$values[1];
if ($Rc != 0) {
push @value, [$frame, $frame_firmware_level, -1];
return (\@value);
}
my $level_a;
my $level_b;
if( $frame_firmware_level =~ /curr_level_a=(\d{3}),curr_ecnumber_a=02(\w{5})/) {
$level_a = "$2_$1";
}
if( $frame_firmware_level =~ /curr_level_b=(\d{3}),curr_ecnumber_b=02(\w{5})/) {
$level_b = "$2_$1";
}
#print "frame_firmware_level=$frame_firmware_level,level_a=$level_a,level_b=$level_b\n";
foreach my $l (@levels) {
#print "rpm requires: $l\n" ;
if( (defined($level_a) && ( $l gt $level_a )) || (defined($level_b) && ( $l gt $level_b )) ) {
my $res = "New Managed System level for $name is not compatible with current Power Subsystem level 02$level_a on $frame.\nPower Subsystem level 02$l or later is required.";
push @value, [$name, $res, -1];
return (\@value);
}
}
}
#}
}
if(!defined($housekeeping)) {
my $values = xCAT::FSPUtils::fsp_api_action( $name, $d, "list_firmware_level");
my $Rc = @$values[2];
my $level = @$values[1];
#####################################
# Return error
#####################################
if ( $Rc != SUCCESS ) {
push @value, [$name,$level,$Rc];
next;
}
if (( $level =~ /curr_level_primary/ ) || ( $level =~ /curr_level_a/ )) {
$role = 0x01;
} else {
$role = 0x02;
}
if ( $level =~ /ecnumber=(\w+)/ ) {
$release_level = $1;
&dpush( \@value, [$name,"$mtms :release level:$1"]);
}
if ( $level =~ /ecnumber=(\w+)/ ) {
$release_level = $1;
&dpush( \@value, [$name,"$mtms :release level:$1"]);
}
if ( $level =~ /activated_level=(\w+)/ ) {
$active_level = $1;
&dpush( \@value, [$name,"$mtms :activated level:$1"]);
}
if($housekeeping =~ /^commit$/) { $action = "code_commit"}
if($housekeeping =~ /^recover$/) { $action = "code_reject"}
if($activate =~ /^disruptive$/) { $action = "code_update"}
if($activate =~ /^concurrent$/) {
my $res = "\'concurrent\' option not supported in FSPflash.Please use disruptive mode";
push @value, [$name, $res, -1];
if ( $level =~ /activated_level=(\w+)/ ) {
$active_level = $1;
&dpush( \@value, [$name,"$mtms :activated level:$1"]);
}
}
if($housekeeping =~ /^commit$/) { $action = "code_commit"}
if($housekeeping =~ /^recover$/) { $action = "code_reject"}
if($activate =~ /^disruptive$/) {
$action = "code_update";
}
if($activate =~ /^concurrent$/) {
my $res = "\'concurrent\' option not supported in FSPflash.Please use disruptive mode";
push @value, [$name, $res, -1];
next;
}
}
my $msg;
if(!defined($housekeeping)) {
my $flag = 0;
($rpm_file, $xml_file, $upgrade_required,$msg, $flag) = &get_lic_filenames($mtms);
if( $flag == -1) {
push (@value, [$name,"$mtms: $msg"]);
push (@value, [$name,"Failed to upgrade the firmware of $name"]);
return (\@value);
}
dpush ( \@value, [$name, $msg]);
}
my $res = xCAT::FSPUtils::fsp_api_action( $name, $d, $action );
push(@value,[$name, @$res[1], @$res[2]]);
return (\@value);
my $nodes = get_related_fsp_bpa( $mtm, $serial);
#print Dumper($nodes);
my $i = 0;
my $flag = 0;
my $c = @$nodes;
my $name2 = undef;
my @dt;
if ($c == 1 && $role == 0x01 ) {
}
if ($c == 1 && $role == 0x02 ) {
push(@result,[$name, "$name\'s role is Backup FSP or BPC side B). Please configure the Primary FSP or BPC side A.", -1]);
}
if($c == 2 && $role == 0x01 ) {
if($$nodes[0]->{node} eq $name) {
$i = 0;
$name2 = $$nodes[1]->{node}; #Secondary FSP or BPC side B.
} else {
#$name2 = $name; #Secondary FSP or BPC side B.
$name2 = $$nodes[0]->{node}; #the Primary FSP or BPC side A.
}
my($hcp, $id) = get_hcp_id($name2);
@dt = ($id, @$d[1], $mtms, $hcp, @$d[4], 0);
}
if($c ==2 && $role == 0x02) {
if($$nodes[0]->{node} eq $name) {
$name2 = $name; # Secondary FSP or BPC side B.
$name = $$nodes[1]->{node};#the Primary FSP or BPC side A.
} else {
$name2 = $name; # Secondary FSP or BPC side B.
$name = $$nodes[0]->{node}; #primary FSP or BPC side B.
}
@dt = (@$d[0], @$d[1], @$d[2], @$d[3], @$d[4], @$d[5]);
my($hcp, $id) = get_hcp_id($name);
@$d = ($id, $dt[1], $mtms, $hcp, $dt[4], 0);
}
print "name: $name, name2: $name2\n";
my $children = 0;
$SIG{CHLD} = sub { while (waitpid(-1, WNOHANG) > 0) {print "child exit\n";$children--;} };
my $fds = new IO::Select;
my $pipe;
if(defined($name2) ) {
#my($hcp, $id) = get_hcp_id($name2);
#my @dt = ($id, @$d[1], $mtms, $hcp, @$d[4], 0);
($pipe) = fork_cmd( $name2, \@dt, $action );
if ( $pipe ) {
$fds->add( $pipe );
$children++;
my $flag = 0;
($rpm_file, $xml_file, $upgrade_required,$msg, $flag) = &get_lic_filenames($mtms);
if( $flag == -1) {
push (@value, [$name,"$mtms: $msg"]);
push (@value, [$name,"Failed to upgrade the firmware of $name"]);
return (\@value);
}
sleep(5);
}
$pipe = undef;
($pipe) = fork_cmd( $name, $d, $action );
if ( $pipe ) {
$fds->add( $pipe );
$children++;
dpush ( \@value, [$name, $msg]);
}
print "count:\n";
print $fds->count;
print "children:$children\n";
while ( $fds->count > 0 or $children > 0 ) {
my @ready_fds = $fds->can_read(1);
foreach my $rfh (@ready_fds) {
my $val = <$rfh>;
if( defined($val)) {
while($val !~ /ENDOFFREEZE6sK4ci/) {
$val .= <$rfh>;
}
my $resp = thaw($val);
foreach my $t( @$resp ) {
#print Dumper($t);
push @result, [$t->{node}, $t->{contents}, $t->{ret}];
}
next;
}
$fds->remove($rfh);
close($rfh);
}
}
my $res = xCAT::FSPUtils::fsp_api_action( $name, $d, $action, 0, $request->{opt}->{d} );
push(@value,[$name, @$res[1], @$res[2]]);
return (\@value);
}
}
@@ -568,7 +357,6 @@ sub rflash {
return (\@value);
}
1;
+57 -19
View File
@@ -66,7 +66,7 @@ sub parse_args {
$Getopt::Long::ignorecase = 0;
Getopt::Long::Configure( "bundling" );
if ( !GetOptions( \%opt, qw(V|Verbose) )) {
if ( !GetOptions( \%opt, qw(V|Verbose x) )) {
return( usage() );
}
####################################
@@ -89,6 +89,9 @@ sub parse_args {
if ( defined( $ARGV[0] )) {
return(usage( "Invalid Argument: $ARGV[0]" ));
}
if (exists($opt{x}) and $cmd !~ /^deconfig$/) {
return (usage("Option '-x' can't work with '$cmd'"));
}
####################################
# Set method to invoke
####################################
@@ -268,28 +271,63 @@ sub deconfig {
$decfg = XMLin($data);
};
if( $@ ) {
push @result,[$name, "Error: there are some unreadable XML data from the firmware. Please check with the data provider.", -1];
push @result,[$name, "Error: there are some unreadable XML data from the firmware. It can't be parsed by 'xcatd'.", -1];
return (\@result);
}
if( exists($request->{opt}->{x})) {
push @result, [$name, "\n".$data, -1];
next;
}
#print "decfg";
#print Dumper($decfg);
my $node = $decfg->{NODE};
if( defined($node) && exists($node->{Location_code}) ) {
my $Call_Out_Hardware_State ;
my $Call_Out_Method;
my $Location_code;
my $RID;
my $TYPE;
if(ref($node->{GARDRECORD}) ne "ARRAY") {
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}}) {
my $node = $decfg->{NODE};
if( defined($node) && exists($node->{Location_code}) ) {
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}}) {
my $Call_Out_Hardware_State = $unit->{GARDUNIT}->{Call_Out_Hardware_State};
my $Call_Out_Method = $unit->{GARDUNIT}->{Call_Out_Method};
my $Location_code = $unit->{GARDUNIT}->{Location_code};
my $RID = $unit->{GARDUNIT}->{RID};
my $TYPE = $unit->{GARDUNIT}->{TYPE};
while (my ($key, $unit3) = each(%$unit) ) {
if($key eq "GARDUNIT") {
if (ref($unit3) eq "HASH") {
$Call_Out_Hardware_State = $unit3->{Call_Out_Hardware_State};
$Call_Out_Method = $unit3->{Call_Out_Method};
$Location_code = $unit3->{Location_code};
$RID = $unit3->{RID};
$TYPE = $unit3->{TYPE};
push @result,[$name,"$Location_code $RID $Call_Out_Method $Call_Out_Hardware_State $TYPE",0];
} elsif(ref($unit3) eq "ARRAY") {
foreach my $unit4(@$unit3) {
$Call_Out_Hardware_State = $unit4->{Call_Out_Hardware_State};
$Call_Out_Method = $unit4->{Call_Out_Method};
$Location_code = $unit4->{Location_code};
$RID = $unit4->{RID};
$TYPE = $unit4->{TYPE};
push @result,[$name,"$Location_code $RID $Call_Out_Method $Call_Out_Hardware_State $TYPE",0];
}
}
}
}
}
} else {
push @result,[$name,"NO Deconfigured resources", 0];
}
push @result,[$name,"$Location_code $RID $Call_Out_Method $Call_Out_Hardware_State $TYPE",0];
}
} else {
push @result,[$name,"NO Deconfigured resources", 0];
}
}
}
+96 -25
View File
@@ -7,6 +7,7 @@ use xCAT::PPCcli qw(SUCCESS EXPECT_ERROR RC_ERROR NR_ERROR);
use xCAT::PPCpower;
use xCAT::FSPUtils;
#use Data::Dumper;
##########################################################################
# Parse the command line for options and operands
##########################################################################
@@ -132,6 +133,14 @@ sub powercmd_boot {
my $state = power_status($data);
#print "boot:state:$state\n";
my $op = ($state =~ /^off$/) ? "on" : "reset";
# Attribute powerinterval in site table,
# to control the rpower speed
if( defined($request->{'powerinterval'}) ) {
Time::HiRes::sleep($request->{'powerinterval'});
}
$res = xCAT::FSPUtils::fsp_api_action ($node_name, $d, $op);
# @output ...
@@ -158,8 +167,15 @@ sub powercmd {
my $hash = shift;
my @result = ();
my @output;
my $action = $request->{'op'};
my $action;
my $node_name;
my $newids;
my $newnames;
my $newd;
my $lpar_flag = 0;
my $cec_flag = 0;
my $frame_flag = 0;
#print "++++in powercmd++++\n";
#print Dumper($hash);
@@ -180,14 +196,19 @@ sub powercmd {
# ]
# };
foreach my $node_name ( keys %$hash)
foreach $node_name ( keys %$hash)
{
$action = $request->{'op'};
my $d = $hash->{$node_name};
if ($$d[4] =~ /^lpar$/) {
if( !($action =~ /^(on|off|of|reset|sms)$/)) {
push @output, [$node_name, "\'$action\' command not supported for LPAR", -1 ];
return (\@output);
}
$newids .= "$$d[0],";
$newnames .="$node_name,";
$newd = $d;
$lpar_flag = 1;
} elsif ($$d[4] =~ /^(fsp|cec)$/) {
if($action =~ /^on$/) { $action = "cec_on_autostart"; }
if($action =~ /^off$/) { $action = "cec_off"; }
@@ -195,39 +216,77 @@ sub powercmd {
if($action =~ /^lowpower$/) { $action = "cec_on_low_power"; }
if($action !~ /^cec_on_autostart$/ && $action !~ /^cec_off$/ && $action !~ /^cec_on_low_power$/ && $action !~ /^onstandby$/ && $action !~ /^reboot_service_processor$/ ) {
push @output, [$node_name, "\'$action\' command not supported for CEC", -1 ];
#return (\@output);
next;
}
next;
}
$newids = $$d[0];
$newnames = $node_name;
$newd = $d;
$cec_flag = 1;
} else {
if ( $action =~ /^rackstandby$/) {
$action = "enter_rack_standby";
} elsif ( $action=~/^exit_rackstandby$/) {
$action = "exit_rack_standby";
} else {
} elsif ($action =~ /^resetsp$/) {
$action = "reboot_service_processor";
} else {
push @output, [$node_name, "$node_name\'s type isn't fsp or lpar. Not allow doing this operation", -1 ];
#return (\@output);
next;
}
$newids = $$d[0];
$newnames = $node_name;
$newd = $d;
$frame_flag = 1;
}
my $res = xCAT::FSPUtils::fsp_api_action($node_name, $d, $action );
# print "In boot, state\n";
# print Dumper($res);
my $Rc = @$res[2];
my $data = @$res[1];
#my $type = @$d[4];
#my $id = ($type=~/^(fsp|bpa)$/) ? $type : @$d[0];
##################################
# Output error
##################################
if ( $Rc != SUCCESS ) {
push @output, [$node_name,$data,$Rc];
# next;
} else {
push @output, [$node_name,"Success",$Rc];
if( $lpar_flag && $cec_flag) {
push @output, [$node_name," $node_name\'s type is different from the last node. The noderange of power control operation could NOT be lpar/cec mixed" , -1 ];
return (\@output);
}
if( $lpar_flag && $frame_flag) {
push @output, [$node_name," $node_name\'s type is different from the last node. The noderange of power control operation could NOT be lpar/frame mixed" , -1 ];
return (\@output);
}
if( $cec_flag && $frame_flag) {
push @output, [$node_name," $node_name\'s type is different from the last node. The noderange of power control operation could NOT be cec/frame mixed" , -1 ];
return (\@output);
}
}
$$newd[0] = $newids;
#print Dumper($newd);
my $res = xCAT::FSPUtils::fsp_api_action($newnames, $newd, $action, 0, $request->{'powerinterval'} );
# print "In boot, state\n";
# print Dumper($res);
my $Rc = @$res[2];
my $data = @$res[1];
foreach $node_name ( keys %$hash)
{
my $d = $hash->{$node_name};
if( $data =~ /Error/) {
if( $data =~ /Power interval/) {
$data = "Error: Invalid powerinterval value in the site table. The valid powerinerval value could be 0 to 300 .";
push @output, [$node_name, $data, -1];
next;
} elsif ( $data =~ /$node_name/) {
push @output, [$node_name, $data, -1];
next;
}
}
push @output, [$node_name,"Success", 0];
}
return( \@output );
}
@@ -327,8 +386,20 @@ sub state {
# Node not found
##################################
if ( !exists( $data->{$id} )) {
push @result, [$name, $prefix."Node not found",1];
next;
my $res = xCAT::FSPUtils::fsp_api_action($name, $d, "state");
my $rc = @$res[2];
my $val = @$res[1];
if( $rc != 0) {
push @result, [$name, $prefix.$val,1];
}
if( !defined($val) || $val =~ /^error$/ ) {
push @result, [$name, $prefix."Node not found",1];
next;
} else {
$data->{$id} = $val;
}
}
##################################
# Output value
+14 -11
View File
@@ -23,9 +23,10 @@ my @header = (
["name", "placeholder" ],
["id", "%-8s" ],
["type-model", "%-12s" ],
["serial-number", "%-15s" ],
["side", "%-8s" ],
["address", "%-20s\n" ]);
["serial-number", "%-15s\n" ]);
#,
# ["side", "%-8s" ],
# ["address", "%-20s\n" ]);
my @attribs = qw(nodetype node id mtm serial side hcp pprofile parent groups mgt cons hwtype);
my %globalnodetype = (
@@ -152,15 +153,15 @@ sub enumerate {
my $ip_s = $8;
if(! defined( $ips)) {
if( $ip_s =~ /unavailable/ ) {
$ips ="$ip;";
$ips ="$ip";
} else {
$ips ="$ip;$ip_s;";
$ips ="$ip;$ip_s";
}
} else {
if( $ip_s =~ /unavailable/ ) {
$ips .="$ip";
$ips .=";$ip";
} else {
$ips .="$ip;$ip_s";
$ips .=";$ip;$ip_s";
}
}
}
@@ -173,7 +174,8 @@ sub enumerate {
$side="";
}
push @values, join( ",",
$$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $ips, $$d[4]);
$$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname);
#$$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $ips, $$d[4]);
# $$d[4],$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $7);
# "fsp",$node_name,$cageid,$model,$serial,$side, $server,$prof,$fname, $7);
#"fsp",$fsp,$cageid,$model,$serial,$side,$server,$prof,$fname,$ips );
@@ -204,14 +206,15 @@ sub enumerate {
my $server = $fsp;
my $ips = "";
my $port = "";
$name =~ s/\-//g;
$name =~ tr/A-Z/a-z/;
# $name =~ s/\-//g;
# $name =~ tr/A-Z/a-z/;
#####################################
# Save LPAR information
#####################################
push @values, join( ",",
"lpar",$name,$lparid,$model,$serial,$port,$server,$prof,$fsp,$ips,"lpar" );
"lpar",$name,$lparid,$model,$serial,$port,$server,$prof,$fsp );
#"lpar",$name,$lparid,$model,$serial,$port,$server,$prof,$fsp,$ips,"lpar" );
}
+230 -92
View File
@@ -4,7 +4,7 @@ BEGIN
{
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat';
}
package xCAT::FSPvm;
use lib "$::XCATROOT/lib/perl";
@@ -47,26 +47,38 @@ sub parse_args {
##########################################################################
# Parse the chvm command line for options and operands
##########################################################################
sub chvm_parse_lparname {
my $args = shift;
my $opt = shift;
if ((ref($args) ne 'ARRAY') ||
(scalar(@$args) > '1')){
return "@$args";
}
my ($cmd, $value) = split(/\=/, $args->[0]);
if ($cmd !~ /^lparname$/) {
return "'$cmd' not support";
}
if (!defined($value)) {
return "value not specified";
}
$opt->{$cmd} = $value;
if ($value && $value ne '*' && $value !~ /^[a-zA-Z0-9-_]+$/) {
return "'$value' invalid";
}
return undef;
sub chvm_parse_extra_options {
my $args = shift;
my $opt = shift;
if (ref($args) ne 'ARRAY') {
return "$args";
}
foreach (@$args) {
my ($cmd, $value) = split (/\=/, $_);
if (!defined($value)) {
return "no value specified";
}
if ($cmd =~ /^lparname$/) {
if ($value ne '*' && $value !~ /^[a-zA-Z0-9-_]$/) {
return "'$value' invalid";
}
my $len = rindex $value."\$", "\$";
if ($len > '47') {
return "'$value' is too long, max 47 characters";
}
# } elsif ($cmd =~ /^huge_page$/) {
# if ($value !~ /^\d+\/\d+\/\d+$/) {
# return "'$value' invalid";
# }
} else {
return "'$cmd' not support";
}
$opt->{$cmd} = $value;
}
return undef;
}
sub chvm_parse_args {
my $request = shift;
@@ -201,7 +213,7 @@ sub chvm_parse_args {
return(usage( "Invalid entry: $opt{m}.\n For Power 775, the pending memory interleaving mode only could be interleaved(or 1), or non-interleaved(or 2)." ));
}
} else {
$opt{m} = 2 ;# non-interleaved, which is the default
$opt{m} = 1 ;# interleaved, which is the default
}
my @ratio = (1, 2, 3, 4, 5);
@@ -294,20 +306,15 @@ sub chvm_parse_args {
# Check for an extra argument
####################################
if ( defined( $ARGV[0] )) {
my $check_chvm_lpar_arg = chvm_parse_lparname(\@ARGV, \%opt);
if (defined($check_chvm_lpar_arg)) {
return (usage("Invalid argument: $check_chvm_lpar_arg"));
my $check_chvm_arg = chvm_parse_extra_options(\@ARGV, \%opt);
if (defined($check_chvm_arg)) {
return (usage("Invalid argument: $check_chvm_arg"));
} elsif (($opt{lparname} ne '*') && (scalar(@{$request->{node}}) > '1')){
return(usage( "Invalid argument: must specify '*' for more than one node" ));
} else {
my $len = rindex $opt{lparname}."\$", "\$";
if ($len > '47') {
return (usage("Invalid lparname '$opt{lparname}', name is too long, max 47 characters"));
}
}
if (exists($opt{lparname}) &&
(exists($opt{p}) || exists($opt{i}) || exists($opt{m}) || exists($opt{r}))) {
return (usage("lparname should NOT be used with -p, -i, -m or -r."));
if ((exists($opt{lparname}) ||exists($opt{huge_page})) &&
(exists($opt{p}) || exists($opt{i}) || exists($opt{r}))) {
return (usage("lparname should NOT be used with -p, -i or -r."));
}
}
@@ -617,20 +624,29 @@ sub modify {
my $usage_string = xCAT::Usage->getUsage($request->{command});
return modify_by_prof( $request, $hash) if ( $request->{opt}->{p} || $request->{stdin});
return create( $request, $hash) if ( $request->{opt}->{i});
return op_lparname ($request, $hash) if ($request->{opt}->{lparname});
return op_extra_cmds ($request, $hash) if ($request->{opt}->{lparname} || $request->{opt}->{huge_page});
return ([["Error", "Miss argument\n".$usage_string, 1]]);
}
sub do_set_lparname {
sub do_op_extra_cmds {
my $request = shift;
my $hash = shift;
my @values = ();
my $action;
my $param;
if (exists($request->{opt}->{lparname})) {
$action = "set_lpar_name";
$param = $request->{opt}->{lparname};
} elsif (exists($request->{opt}->{huge_page})) {
$action = "set_huge_page";
$param = $request->{opt}->{huge_page};
}
my $lparname_para = $request->{opt}->{lparname};
while (my ($mtms, $h) = each(%$hash)) {
while (my($name, $d) = each(%$h)) {
my $lparname = ($lparname_para eq '*') ? $name : $lparname_para;
my $values = xCAT::FSPUtils::fsp_api_action($name, $d, "set_lpar_name", 0, $lparname);
if (@$values[1] && ((@$values[1] =~ /Error/i) && (@$values[2] ne '0'))) {
return ([[$name, @$values[1], '1']]) ;
my $tmp_value = ($param eq '*') ? $name : $param;
my $value = xCAT::FSPUtils::fsp_api_action($name, $d, $action, 0, $tmp_value);
if (@$value[1] && ((@$value[1] =~ /Error/i) && (@$value[2] ne '0'))) {
return ([[$name, @$value[1], '1']]) ;
} else {
push @values, [$name, "Success", '0'];
}
@@ -653,7 +669,7 @@ sub check_node_info {
return $not_lpar;
}
sub op_lparname {
sub op_extra_cmds {
my $request = shift;
my $hash = shift;
my $node = $request->{node};
@@ -661,7 +677,7 @@ sub op_lparname {
if (defined($lpar_flag)) {
return ([[$lpar_flag,"Node must be LPAR", 1]]);
}
return &do_set_lparname($request, $hash);
return &do_op_extra_cmds($request, $hash);
}
@@ -824,16 +840,42 @@ sub enumerate {
return( [0,\%outhash] );
}
sub get_cec_lpar_info {
my $name = shift;
my $attr = shift;
my $lparid = shift;
my $values = xCAT::FSPUtils::fsp_api_action($name, $attr, "get_lpar_info");
sub get_cec_attr_info {
my $name = shift;
my $attr = shift;
my $op = shift;
my %op_hash = (
lpar_info => "get_lpar_info",
bsr => "get_cec_bsr",
huge_page => "get_huge_page"
);
my $action = $op_hash{$op};
my $values = xCAT::FSPUtils::fsp_api_action($name, $attr, $action);
if (@$values[1] && ((@$values[1] =~ /Error/i) && @$values[2] ne '0')) {
return ([[$name, @$values[1], '1']]);
}
return @$values[1];
}
sub get_cec_lpar_hugepage {
my $name = shift;
my $huge_info = shift;
my $lparid = shift;
my $lparname = shift;
my @value = split(/\n/, $huge_info);
foreach my $v (@value) {
if($v =~ /\s*([^\s]+)\s*:\s*([\d|\/]+)/) {
my $tmp_name = $1;
my $tmp_num = $2;
if($tmp_name =~ /^$lparname$/) {
return $tmp_num;
}
}
}
return ([[$name, "can not get huge page info for lpar id $lparid", '1']]);
}
sub get_cec_lpar_name {
my $name = shift;
my $lpar_info = shift;
@@ -847,25 +889,87 @@ sub get_cec_lpar_name {
}
}
return ([[$name, "can not get lparname for lpar id $lparid", '1']]);
}
sub get_lpar_lpar_name {
sub get_cec_lpar_bsr {
my $name = shift;
my $attr = shift;
my $values = xCAT::FSPUtils::fsp_api_action($name, $attr, "get_lpar_name");
if (@$values[1] && ((@$values[1] =~ /Error/i) && (@$values[2] ne '0'))) {
my @result = ();
push @result, $values;
return \@result;
my $lpar_info = shift;
my $lparid = shift;
my $lparname = shift;
my @value = split(/\n/, $lpar_info);
foreach my $v (@value) {
if($v =~ /\s*([^\s]+)\s*:\s*([\d]+)/) {
my $tmp_name = $1;
my $tmp_num = $2;
if($tmp_name =~ /^$lparname$/) {
return $tmp_num;
}
}
}
return @$values[1];
return ([[$name, "can not get BSR info for lpar id $lparid", '1']]);
}
sub get_cec_cec_bsr {
my $name = shift;
my $lpar_info = shift;
my $index = 0;
my @value = split(/\n/, $lpar_info);
my $cec_bsr = "";
foreach my $v (@value) {
if ($v =~ /(Number of BSR arrays:)\s*(\d+)/i) {
$cec_bsr .= "$1 $2,";
$index++;
} elsif ($v =~ /(Bytes per BSR array:)\s*(\d+)/i) {
$cec_bsr .= "$1 $2,";
$index++;
} elsif ($v =~ /(Available BSR array:)\s*(\d+)/i) {
$cec_bsr .= "$1 $2;\n";
$index++;
}
}
if ($index != 3) {
return undef;
} else {
return $cec_bsr;
}
}
sub get_cec_cec_hugepage {
my $name = shift;
my $huge_info = shift;
my $index = 0;
my @value = split (/\n/, $huge_info);
my $cec_hugepage = "";
foreach my $v (@value) {
if ($v =~ /(Available huge page memory\(in pages\):)\s*(\d+)/i) {
my $tmp = sprintf "%-40s %s;\n", $1, $2;
$cec_hugepage .= $tmp;
$index++;
} elsif($v =~ /(Configurable huge page memory\(in pages\):)\s*(\d+)/i){
my $tmp = sprintf "%-40s %s;\n", $1, $2;
$cec_hugepage .= $tmp;
$index++;
} elsif($v =~ /(Page Size\(in GB\):)\s*(\d+)/i) {
my $tmp = sprintf "%-40s %s;\n", $1, $2;
$cec_hugepage .= $tmp;
$index++;
} elsif($v =~ /(Maximum huge page memory\(in pages\):)\s*(\d+)/i) {
my $tmp = sprintf "%-40s %s;\n", $1, $2;
$cec_hugepage .= $tmp;
$index++;
} elsif($v =~ /(Requested huge page memory\(in pages\):)\s*(\d+)/i) {
my $tmp = sprintf "%-40s %s;\n", $1, $2;
$cec_hugepage .= $tmp;
$index++;
}
}
if ($index != 5) {
return undef;
}
return $cec_hugepage;
}
##########################################################################
# Lists logical partitions
##########################################################################
sub list {
my $request = shift;
my $hash = shift;
my $args = $request->{opt};
@@ -875,11 +979,15 @@ sub list {
my $d;
my @result;
my $lpar_infos;
my $bsr_infos;
my $huge_infos;
my %lpar_huges = ();
my $l_string = "\n";
#print Dumper($hash);
while (my ($mtms,$h) = each(%$hash) ) {
my $info = enumerate( $h, $mtms );
my $Rc = shift(@$info);
my $data = @$info[0];
my $info = enumerate( $h, $mtms );
my $Rc = shift(@$info);
my $data = @$info[0];
while (($node_name,$d) = each(%$h) ) {
my $cec = @$d[3];
@@ -887,10 +995,10 @@ sub list {
my $id = @$d[0];
if ( $Rc != SUCCESS ) {
push @result, [$node_name, $data,$Rc];
next;
}
if ( $Rc != SUCCESS ) {
push @result, [$node_name, $data,$Rc];
next;
}
my $values = $data->{0};
my $msg = $data->{1};
@@ -903,37 +1011,69 @@ sub list {
push @result,[$node_name, $msg, 0];
} else {
# get the I/O slot information
if($request->{opt}->{l} and $type =~ /^(fsp|cec)$/) {
$lpar_infos = get_cec_lpar_info($node_name, $d);
if($request->{opt}->{l}) {
if ($type =~ /^(fsp|cec)$/) {
$bsr_infos = get_cec_attr_info($node_name, $d, "bsr");
if (ref($bsr_infos) eq 'ARRAY') {
return $bsr_infos;
}
$huge_infos = get_cec_attr_info($node_name, $d, "huge_page");
if (ref($huge_infos) eq 'ARRAY') {
return $huge_infos;
}
}
$lpar_infos = get_cec_attr_info($node_name, $d, "lpar_info");
if (ref($lpar_infos) eq 'ARRAY') {
return $lpar_infos;
}
}
}
my $v;
my @t;
my @value = split(/\n/, $values);
foreach my $v (@value) {
my ($lparid, @t ) = split (/,/, $v);
my $lparname = undef;
my $ios = join('/', @t);
if ($request->{opt}->{l}) {
my $lparname = get_cec_lpar_name($node_name, $lpar_infos, $lparid);
my $hugepage;
if ($type =~ /^(fsp|cec)$/) {
$lparname = get_cec_lpar_name($node_name, $lpar_infos, $lparid);
my $lpar_bsr = get_cec_lpar_bsr($node_name, $bsr_infos, $lparid, $lparname);
if (ref($lpar_bsr) eq 'ARRAY') {
return $lpar_bsr;
}
$ios .= ": ".$lpar_bsr;
$hugepage = get_cec_lpar_hugepage($node_name, $huge_infos, $lparid, $lparname);
if (ref($hugepage) eq 'ARRAY') {
return $hugepage;
}
} else {
$lparname = get_lpar_lpar_name($node_name, $d);
}
if ($lparid ne $id) {
next;
}
if (defined($lpar_huges{$lparid})) {
$hugepage = $lpar_huges{$lparid};
} else {
$hugepage = get_cec_attr_info($node_name, $d, "huge_page");
if (ref($hugepage) eq 'ARRAY') {
return $hugepage;
}
$lpar_huges{$lparid} = $hugepage;
}
}
$ios .= ": ".$hugepage;
if (ref($lparname) eq 'ARRAY') {
return $lparname;
} else {
$lparname = "$lparname: $lparid";
}
$l_string .= "$lparname: ".$ios."\n";
} else {
$lparname = $lparid;
}
if ($type=~/^(fsp|cec)$/) {
push @result,[$lparname, join('/', @t), $Rc];
} else {
if( $lparid eq $id) {
push @result,[$lparname, join('/', @t), $Rc];
if ($type=~/^(fsp|cec)$/) {
push @result,[$lparid, $ios, $Rc];
} else {
if( $lparid eq $id) {
push @result,[$lparid, $ios, $Rc];
}
}
}
}
@@ -942,11 +1082,21 @@ sub list {
# get the octant configuration value
if ($type=~/^(fsp|cec)$/) {
my $value = $data->{$cec};
push @result,[$node_name, $value, $Rc];
if ($request->{opt}->{l}) {
my $cec_bsr = get_cec_cec_bsr($node_name, $bsr_infos);
my $cec_hugepage = get_cec_cec_hugepage($node_name, $huge_infos);
$l_string .= $value.$cec_bsr;
$l_string .= $cec_hugepage;
} else {
$l_string = $value;
}
}
} # end of while
if ($l_string =~ /^\n$/) {
next;
}
push @result, [$node_name, $l_string, $Rc];
$l_string = "\n";
} # end of while
}# end of while
return( \@result );
}
@@ -1297,16 +1447,4 @@ sub lsvm {
return( list(@_) );
}
1;
+1 -28
View File
@@ -73,7 +73,7 @@ sub getnimprime
my $nimprime = xCAT::Utils->get_site_Master();
my $sitetab = xCAT::Table->new('site');
(my $et) = $sitetab->getAttribs({key => "NIMprime"}, 'value');
(my $et) = $sitetab->getAttribs({key => "nimprime"}, 'value');
if ($et and $et->{value})
{
$nimprime = $et->{value};
@@ -909,33 +909,6 @@ sub dolitesetup
return 1;
}
#
# Check the statelite table for duplicate node entries
#
my $recs=$statelitetab->getAllEntries();
my @SLnodes;
foreach my $entry (@$recs) {
# get the "node" value
my $node = $entry->{node};
# run it through noderange
my @newnodes = xCAT::NodeRange::noderange($node);
# for each node - see if it's already in the list
foreach my $n (@newnodes) {
if (!grep (/^$n$/, @SLnodes) ) {
push(@SLnodes, $n);
} else {
# if it's already in the list then this is an error
my $rsp;
push @{$rsp->{data}}, "The node \'$n\' is included in multiple statelite entries.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
}
}
# create the statelite table file
my $foundentry=0;
my $stateHash = $statelitetab->getNodesAttribs(\@nodelist, ['statemnt', 'mntopts']);
+100 -1
View File
@@ -261,7 +261,8 @@ sub getipaddr
#return inet_ntoa(inet_aton($iporhost))
#TODO, what if no scoket6 support, but passing in a IPv6 hostname?
if ($iporhost =~ /:/) { #ipv6
die "Attempt to process IPv6 address, but system does not have requisite IPv6 perl support";
return undef;
#die "Attempt to process IPv6 address, but system does not have requisite IPv6 perl support";
}
my $packed_ip;
$iporhost and $packed_ip = inet_aton($iporhost);
@@ -521,5 +522,103 @@ sub ip_forwarding_enabled
}
return $enabled;
}
#-------------------------------------------------------------------------------
=head3 get_nic_ip
Get the ip address for the node nics
Arguments:
Returns:
Hash of the mapping of the nic and the ip addresses
Globals:
Error:
none
Example:
xCAT::NetworkUtils->get_nic_ip()
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub get_nic_ip
{
my $nic;
my %iphash;
my $cmd = "ifconfig -a";
my $result = `$cmd`;
my $mode = "MULTICAST";
#############################################
# Error running command
#############################################
if ( !$result ) {
return undef;
}
if (xCAT::Utils->isAIX()) {
##############################################################
# Should look like this for AIX:
# en0: flags=4e080863,80<UP,BROADCAST,NOTRAILERS,RUNNING,
# SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG,CHAIN>
# inet 30.0.0.1 netmask 0xffffff00 broadcast 30.0.0.255
# inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
# en1: ...
#
##############################################################
my @adapter = split /(\w+\d+):\s+flags=/, $result;
foreach ( @adapter ) {
if ($_ =~ /^(en\d)/) {
$nic = $1;
next;
}
if ( !($_ =~ /LOOPBACK/ ) and
$_ =~ /UP(,|>)/ and
$_ =~ /$mode/ ) {
my @ip = split /\n/;
for my $ent ( @ip ) {
if ( $ent =~ /^\s*inet\s+(\d+\.\d+\.\d+\.\d+)/ ) {
$iphash{$nic} = $1;
next;
}
}
}
}
}
else {
##############################################################
# Should look like this for Linux:
# eth0 Link encap:Ethernet HWaddr 00:02:55:7B:06:30
# inet addr:9.114.154.193 Bcast:9.114.154.223
# inet6 addr: fe80::202:55ff:fe7b:630/64 Scope:Link
# UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
# RX packets:1280982 errors:0 dropped:0 overruns:0 frame:0
# TX packets:3535776 errors:0 dropped:0 overruns:0 carrier:0
# collisions:0 txqueuelen:1000
# RX bytes:343489371 (327.5 MiB) TX bytes:870969610 (830.6 MiB)
# Base address:0x2600 Memory:fbfe0000-fc0000080
#
# eth1 ...
#
##############################################################
my @adapter= split /\n{2,}/, $result;
foreach ( @adapter ) {
if ( !($_ =~ /LOOPBACK / ) and
$_ =~ /UP / and
$_ =~ /$mode / ) {
my @ip = split /\n/;
for my $ent ( @ip ) {
if ($ent =~ /^(eth\d|ib\d|hf\d)\s+/) {
$nic = $1;
}
if ( $ent =~ /^\s*inet addr:\s*(\d+\.\d+\.\d+\.\d+)/ ) {
$iphash{$nic} = $1;
next;
}
}
}
}
}
return \%iphash;
}
1;
+6 -4
View File
@@ -107,9 +107,10 @@ sub do_rnetboot {
my $ssh = @$exp[0];
my $userid = @$exp[4];
my $pw = @$exp[5];
my $subreq = $request->{subreq};
my $subreq = $request->{subreq};
my $Rc = SUCCESS;
my $result = "";
my $cmd;
my $result;
#######################################
# Disconnect Expect session
@@ -181,8 +182,7 @@ sub do_rnetboot {
$cmd.= " -o";
}
my $Rc = SUCCESS;
my @macs = split /,/, $opt->{m};
my @macs = split /\|/, $opt->{m};
foreach my $mac ( @macs ) {
#######################################
# Network specified
@@ -259,6 +259,8 @@ sub do_rnetboot {
my $done = 0;
while ( $done < 2 ) {
$result = "";
$Rc = SUCCESS;
#######################################
# Execute command
#######################################
+18 -5
View File
@@ -158,13 +158,18 @@ sub parse_args {
if ( $result ) {
return( usage($result) );
}
} elsif ($_ =~ /_passwd$/) {
return( usage("No argument specified for '$_'"));
}
}
{
my $result = parse_dev_option( $request, \%cmds);
if ($result) {
return ( usage($result));
}
if ($request->{dev} eq '1' && $request->{other} eq '1') {
return ( usage("Invalid command arrays"));
}
# my $result = parse_dev_option( $request, \%cmds);
# if ($result) {
# return ( usage($result));
# }
}
####################################
# Return method to invoke
@@ -310,7 +315,15 @@ sub parse_option {
return( "New password couldn't be empty for user 'HMC'" );
}
}
if ( $command eq 'dev' or $command eq 'celogin1' ) {
if ($value !~ /^(enable|disable)$/i ) {
return( "Invalid argument '$value'" );
}
$request->{dev} = 1;
} else {
$request->{other} = 1;
}
return undef;
}
+18 -13
View File
@@ -152,7 +152,7 @@ sub add_ppc {
###############################
# Update ppc table
###############################
if ( $type =~ /^(fsp|bpa|lpar|frame|cec)$/ ) {
if ( $type =~ /^(fsp|bpa|lpar|frame|cec|hmc)$/ ) {
$db{ppc}->setNodeAttribs( $name,
{ hcp=>$server,
id=>$id,
@@ -437,7 +437,7 @@ sub update_node_attribs
###########################
my @users = qw(HMC admin general);
foreach my $user ( @users ) {
my $pwhash = $db->{ppcdirect}->getAttribs( {hcp=>$predefined_node,username=>$user}, qw(password comments disable));
my $pwhash = $db->{ppcdirect}->getAttribs( {hcp=>$predefined_node,username=>$user}, qw(password comments disable)); # need regx
if ( $pwhash )
{
if ( $namediff )
@@ -602,10 +602,10 @@ sub add_ppchcp {
my $hwtype = shift;
my $values = shift;
my @tabs = qw(ppchcp nodehm nodelist nodetype mac ppc);
my @tabs = qw(ppchcp nodehm nodelist nodetype mac ppc vpd);
my %db = ();
my ($name, $mac) = split ',', $values;
my ($name, $mac, $mtm, $sn, $ip) = split ',', $values;
###################################
# Open database needed
@@ -619,7 +619,7 @@ sub add_ppchcp {
###################################
# Update ppchcp table
###################################
my ($ent) = $db{ppchcp}->getAttribs({ hcp=>$name},'hcp');
my ($ent) = $db{ppchcp}->getNodeAttribs( $name,'hcp');
if ( !defined($ent) ) {
$db{ppchcp}->setAttribs( {hcp=>$name},
{ username=>"",
@@ -641,6 +641,11 @@ sub add_ppchcp {
# Update mac table
###################################
$db{mac}->setNodeAttribs( $name, {mac=>$mac});
###################################
# Update vpd table
###################################
$db{vpd}->setNodeAttribs( $name, {mtm=>$mtm});
$db{vpd}->setNodeAttribs( $name, {serial=>$sn});
###################################
# Update nodelist table
@@ -699,7 +704,7 @@ sub add_systemX {
###################################
# Update mpa table
###################################
my ($ent) = $db{mpa}->getAttribs({ mpa=>$name},'mpa');
my ($ent) = $db{mpa}->getNodeAttribs( $name,'mpa');
if ( !defined($ent) ) {
$db{mpa}->setAttribs( {mpa=>$name},
{ username=>"",
@@ -786,13 +791,13 @@ sub credentials {
$tab = xCAT::Table->new( $hcptab{$hwtype} );
if ( $tab ) {
my $ent;
if ( $user_specified)
{
if ( $user_specified)
{ # need regx
($ent) = $tab->getAttribs( {hcp=>$server,username=>$user},qw(password));
}
else
{
($ent) = $tab->getAttribs( {hcp=>$server}, qw(username password));
($ent) = $tab->getNodeAttribs( $server, qw(username password));
}
if ( $ent){
if (defined($ent->{password})) { $pass = $ent->{password}; }
@@ -801,15 +806,15 @@ sub credentials {
##############################################################
# If no user/passwd found, check if there is a default group
##############################################################
elsif( ($ent) = $tab->getAttribs( {hcp=>$defaultgrp{$hwtype}}, qw(username password)))
else
{
if ( $user_specified)
{
($ent) = $tab->getAttribs( {hcp=>$defaultgrp{$hwtype},username=>$user},qw(password));
{ # need regx
($ent) = $tab->getAllAttribs( {hcp=>$defaultgrp{$hwtype},username=>$user},qw(password));
}
else
{
($ent) = $tab->getAttribs( {hcp=>$defaultgrp{$hwtype}}, qw(username password));
($ent) = $tab->getNodeAttribs( $defaultgrp{$hwtype}, qw(username password));
}
if ( $ent){
if (defined($ent->{password})) { $pass = $ent->{password}; }
+25 -8
View File
@@ -12,7 +12,6 @@ use Getopt::Long;
use File::Spec;
use POSIX qw(tmpnam);
my $packages_dir= ();
my $activate = ();
my $verbose = 0;
@@ -51,7 +50,6 @@ sub parse_args {
my $cmd = $request->{command};
my $args = $request->{arg};
#############################################
# Change CEC/Frame node into FSPs/BPAs
#############################################
@@ -96,7 +94,7 @@ sub parse_args {
$Getopt::Long::ignorecase = 0;
Getopt::Long::Configure( "bundling" );
if ( !GetOptions( \%opt, qw(h|help v|version V|verbose p=s activate=s commit recover) )) {
if ( !GetOptions( \%opt, qw(h|help v|version V|verbose p=s d=s activate=s commit recover) )) {
return( usage() );
}
@@ -136,6 +134,17 @@ sub parse_args {
if ( exists( $opt{p} ) && ($opt{p} !~ /^\//) ) {#relative path
$opt{p} = xCAT::Utils->full_path($opt{p}, $request->{cwd}->[0]);
}
if( exists( $opt{d} ) ) {
if(!exists( $opt{activate}) ) {
return( usage("Option -d must be used with --activate ") );
}
}
if ( exists( $opt{d} ) && ($opt{d} !~ /^\//) ) {#relative path
$opt{d} = xCAT::Utils->full_path($opt{d}, $request->{cwd}->[0]);
}
###############################
#--activate's value only can be concurrent and disruptive
################################
@@ -143,8 +152,12 @@ sub parse_args {
if( ($opt{activate} ne "concurrent") && ($opt{activate} ne "disruptive")) {
return (usage("--activate's value can only be concurrent or disruptive"));
}
if(!exists( $opt{d} )) {
$opt{d} = "/tmp";
}
}
####################################
# Check for "-" with no option
####################################
@@ -194,8 +207,12 @@ sub parse_args {
if(noderange_validate($request) == -1) {
return(usage());
}
$request->{callback}->({data =>[ "It may take considerable time to complete, depending on the number of systems being updated. In particular, power subsystem updates may take an hour or more if there are many attached managed systems. Please waiting."]});
$request->{callback}->({data =>[ "It may take considerable time to complete, depending on the number of systems being updated. In particular, power subsystem updates may take an hour or more if there are many attached managed systems. Please waiting. "]});
if( $request->{hwtype} =~ /^(fsp|bpa)$/ && $opt{activate} =~ /^disruptive$/ ) {
$request->{callback}->({data =>[ "You can find the log files in the /var/log/xcatd/dfm/rflash/."]});
}
####################################
# No operands - add command name
@@ -343,7 +360,7 @@ sub preprocess_for_rflash {
my $cmd;
if( -d $packages_fw) {
$cmd = "rm -rf $packages_fw";
$cmd = "rm -rf $packages_fw/*";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
@@ -354,7 +371,7 @@ sub preprocess_for_rflash {
}
}
$cmd = "mkdir $packages_fw";
$cmd = "mkdir -p $packages_fw";
xCAT::Utils->runcmd("$cmd", 0);
if ($::RUNCMD_RC != 0)
{
+2 -2
View File
@@ -267,7 +267,7 @@ sub mkvm_parse_args {
my $lparparent;
my $ppctab = xCAT::Table->new('ppc');
foreach my $vnode (@{$opt{target}}) {
my $vcon = $ppctab->getAttribs({node => $vnode}, ('node','parent'));
my $vcon = $ppctab->getNodeAttribs( $vnode, ('node','parent'));
if ($vcon and $vcon->{"node"} and $vcon->{"parent"}) {
my $lparent = $vcon->{"parent"};
$lparparent->{$lparent}->{$vnode} = $vnode;
@@ -1966,7 +1966,7 @@ sub mkfulllpar {
# Create the new full LPAR's configure data
#################################
my ($lpar_id, $profname);
my $vcon = $ppctab->getAttribs({node => $name}, ('id','pprofile'));
my $vcon = $ppctab->getAttribs($name, ('id','pprofile'));
if ($vcon) {
if ($vcon->{"id"}) {
$lpar_id = $vcon->{"id"};
+2 -2
View File
@@ -116,9 +116,9 @@ sub remote_copy_command
# if only syncing the service node or no postscripts then do not
# get update file notification
if (($::SYNCSN == 1) || (!(defined @::postscripts))) {
$sync_opt .= '-Lprotz ';
$sync_opt .= '-Lprogtz ';
} else {
$sync_opt .= '-Liprotz --out-format=%f%L '; # add notify of update
$sync_opt .= '-Liprogtz --out-format=%f%L '; # add notify of update
}
$sync_opt .= $$config{'options'};
if ($::SYNCSN == 1)
+14 -5
View File
@@ -532,7 +532,7 @@ noderes => {
servicenode => 'A comma separated list of node names (as known by the management node) that provides most services for this node. The first service node on the list that is accessible will be used. The 2nd node on the list is generally considered to be the backup service node for this node when running commands like snmove.',
netboot => 'The type of network booting to use for this node. Valid values: pxe or xnba for x86* architecture, yaboot for POWER architecture.',
tftpserver => 'The TFTP server for this node (as known by this node).',
nfsserver => 'The NFS server for this node (as known by this node).',
nfsserver => 'The NFS or HTTP server for this node (as known by this node).',
monserver => 'The monitoring aggregation point for this node. The format is "x,y" where x is the ip address as known by the management node and y is the ip address as known by the node.',
nfsdir => 'The path that should be mounted from the NFS server.',
installnic => 'The network adapter on the node that will be used for OS deployment, the installnic can be set to the network adapter name or the mac address or the keyword "mac" which means that the network interface specified by the mac address in the mac table will be used. If not set, primarynic will be used.',
@@ -784,8 +784,8 @@ site => {
" mn|eth1,eth2;service|bond0.\n\n".
" dhcpsetup: If set to 'n', it will skip the dhcp setup process in the nodeset cmd.\n\n".
" disjointdhcps: If set to '1', the .leases file on a service node only contains\n".
" dnshandler: Name of plugin that handles DNS setup for makedns.\n".
" the nodes it manages. The default value is '0'.\n\n".
" dnshandler: Name of plugin that handles DNS setup for makedns.\n".
" domain: The DNS domain name used for the cluster.\n\n".
" ea_primary_hmc: The hostname of the HMC that the Integrated Switch Network\n".
" Management Event Analysis should send hardware serviceable\n".
@@ -821,7 +821,10 @@ site => {
" ipmitimeout: The timeout to use when communicating with BMCs.\n\n".
" iscsidir: The path to put the iscsi disks in on the mgmt node.\n\n".
" master: The hostname of the xCAT management node, as known by the nodes.\n\n".
" maxssh: The max # of SSH connections at any one time to the hw ctrl point for PPC\n\n".
" maxssh: The max # of SSH connections at any one time to the hw ctrl point for PPC.\n".
" This parameter doesn't take effect on the rpower command.\n".
" It takes effects on other PPC hardware control command getmacs/rnetboot/rbootseq and so on.\n".
" Default is 8.\n\n".
" mnroutenames: The name of the routes to be setup on the management node.\n\n".
" It is a comma separated list of route names that are defined in the routes table.\n\n".
" nameservers: A comma delimited list of DNS servers that each node in the cluster\n".
@@ -836,11 +839,17 @@ site => {
" the node deployment, node discovery and power operations.\n\n".
" ntpservers: A comma delimited list of NTP servers for the cluster - often the\n".
" xCAT management node.\n\n".
" syspowerinterval: The time of seconds that rpower command on CECs will wait between.\n".
" The CECs should be in the same frame. It is used for controlling the\n".
" CECs boot up speed. Default is 0.\n\n".
" powerinterval: The time of seconds that rpower command will wait between\n".
" performing action on each target object.\n".
" It is used for controlling the cluster boot up speed\n".
" in large clusters. Default is 0.\n\n".
" ppcmaxp: The max # of processes for PPC hw ctrl.\n\n".
" in large clusters. Default is 0.\n".
" And it's used to control the time for the power command on each lpar by each hcp.\n\n".
" ppcmaxp: The max # of processes for PPC hw ctrl. If there are more than ppcmaxp hcps,\n".
" this parameter will take effect. It will control the max number of processes \n".
" for PPC hardware control commands. Default is 64.\n\n".
" ppcretry: The max # of PPC hw connection attempts before failing.\n\n".
" ppctimeout: The timeout, in milliseconds, to use when communicating with PPC hw.\n\n".
" pruneservices: Whether to enable service pruning when noderm is run (i.e.\n".
+10 -2
View File
@@ -274,6 +274,14 @@ sub handle_dbc_request {
}
my $oldhandle = $::XCAT_DBHS->{$dbindex}; #store old handle off
$::XCAT_DBHS->{$dbindex} = $::XCAT_DBHS->{$dbindex}->clone(); #replace broken db handle with nice, new, working one
unless ($::XCAT_DBHS->{$dbindex}) { #this means the clone failed
#most likely result is the DB is down
#restore the old broken handle
#so that future recovery attempts have a shot
#a broken db handle we can recover, no db handle we cannot
$::XCAT_DBHS->{$dbindex} = $oldhandle;
return undef;
}
$dbobjsforhandle->{$::XCAT_DBHS->{$dbindex}} = $dbobjsforhandle->{$oldhandle}; #Move the map of depenednt objects to the new handle
foreach (@afflictedobjs) { #migrate afflicted objects to the new DB handle
$$_->{dbh} = $::XCAT_DBHS->{$dbindex};
@@ -3806,7 +3814,7 @@ sub writeAllEntries
$rc=output_table($self->{tabname},$fh,$self,$data);
}
$query->finish();
close $fh;
CORE::close($fh);
return $rc;
}
@@ -3892,7 +3900,7 @@ sub writeAllAttribsWhere
$rc=output_table($self->{tabname},$fh,$self,$data);
}
$query->finish();
close $fh;
CORE::close($fh);
return $rc ;
}
#--------------------------------------------------------------------------
+20 -11
View File
@@ -69,7 +69,8 @@ my %usage = (
PPC specific(with HMC):
rinv <noderange> [bus|config|serial|model|firm|all]
PPC specific(using Direct FSP Management):
rinv <noderange> [firm|deconfig]
rinv <noderange> [firm]
rinv <noderange> [deconfig [-x]]
Blade specific:
rinv <noderange> [mtm|serial|mac|bios|diag|mprom|mparom|firm|all]
VMware specific:
@@ -130,27 +131,35 @@ my %usage = (
*_passwd=<currentpasswd,newpasswd>|
hostname=<*|hostname>
FSP/CEC (using Direct FSP Management) Specific:
rspconfig noderange HMC_passwd={currentpasswd,newpasswd}
rspconfig noderange admin_passwd={currentpasswd,newpasswd}
rspconfig noderange general_passwd={currentpasswd,newpasswd}
rspconfig noderange *_passwd={currentpasswd,newpasswd}
rspconfig <noderange> HMC_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> admin_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> general_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> *_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> [sysname]
rspconfig <noderange> [sysname=<*|name>]
rspconfig <noderange> [pending_power_on_side]
rspconfig <noderange> [pending_power_on_side=<temp|perm>]
rspconfig <noderange> [cec_off_policy]
rspconfig <noderange> [cec_off_policy=<poweroff|stayon>]
rspconfig <noderange> [huge_page]
rspconfig <noderange> [huge_page=<NUM>]
rspconfig <noderange> [BSR]
rspconfig <noderange> [setup_failover]
rspconfig <noderange> [setup_failover=<enable|disable>]
rspconfig <noderange> [force_failover]
rspconfig <noderange> --resetnet
BPA/Frame (using Direct FSP Management)specific:
rspconfig noderange HMC_passwd={currentpasswd,newpasswd}
rspconfig noderange admin_passwd={currentpasswd,newpasswd}
rspconfig noderange general_passwd={currentpasswd,newpasswd}
rspconfig noderange *_passwd={currentpasswd,newpasswd}
rspconfig <noderange> HMC_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> admin_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> general_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> *_passwd=<currentpasswd,newpasswd>
rspconfig <noderange> [frame]
rspconfig <noderange> frame=<*|frame>
rspconfig <noderange> [sysname]
rspconfig <noderange> [sysname=<*|name>]
rspconfig <noderange> [pending_power_on_side]
rspconfig <noderange> [pending_power_on_side=<temp|perm>]
rspconfig <noderange> --resetnet
HMC specific:
rspconfig <noderange> [sshcfg]
rspconfig <noderange> [sshcfg=<enable|disable>]
@@ -214,10 +223,10 @@ my %usage = (
"Usage:
rflash [ -h|--help|-v|--version]
PPC (with HMC) specific:
rflash <noderange> -p directory [--activate concurrent | disruptive][-V|--verbose]
rflash <noderange> -p <rpm_directory> [--activate concurrent | disruptive][-V|--verbose]
rflash <noderange> [--commit | --recover] [-V|--verbose]
PPC (using Direct FSP Management) specific:
rflash <noderange> -p directory --activate disruptive
rflash <noderange> -p <rpm_directory> --activate disruptive [-d <data_directory>]
rflash <noderange> [--commit | --recover] [-V|--verbose]",
"mkhwconn" =>
"Usage:
+252 -228
View File
@@ -26,6 +26,7 @@ use strict;
use Symbol;
use Digest::SHA1 qw/sha1/;
use IPC::Open3;
use IO::Select;
use warnings "all";
require xCAT::InstUtils;
require xCAT::NetworkUtils;
@@ -997,7 +998,7 @@ sub runcmd3 { #a proper runcmd that indpendently returns stdout, stderr, pid and
is joined into a single string with the newlines separating the lines.
Arguments:
command, exitcode and reference to output
command, exitcode, reference to output, streaming mode
Returns:
see below
Globals:
@@ -1016,6 +1017,8 @@ sub runcmd3 { #a proper runcmd that indpendently returns stdout, stderr, pid and
Example:
my $outref = xCAT::Utils->runcmd($cmd, -2, 1);
$::CALLBACK= your callback (required for streaming from plugins)
my $outref = xCAT::Utils->runcmd($cmd,-2, 1, 1); streaming
Comments:
If refoutput is true, then the output will be returned as a
@@ -1029,7 +1032,7 @@ sub runcmd
{
my ($class, $cmd, $exitcode, $refoutput) = @_;
my ($class, $cmd, $exitcode, $refoutput, $stream) = @_;
$::RUNCMD_RC = 0;
# redirect stderr to stdout
if (!($cmd =~ /2>&1$/)) { $cmd .= ' 2>&1'; }
@@ -1055,8 +1058,30 @@ sub runcmd
}
my $outref = [];
@$outref = `$cmd`;
if ($?)
if (!defined($stream) || (length($stream) == 0)) { # do not stream
@$outref = `$cmd`;
} else { # streaming mode
my @cmd;
push @cmd,$cmd;
my $rsp = {};
my $output;
my $errout;
open (PIPE, "$cmd |");
while (<PIPE>) {
if ($::CALLBACK){
$rsp->{data}->[0] = $_;
$::CALLBACK->($rsp);
} else {
xCAT::MsgUtils->message("D", "$_");
}
$output .= $_;
}
# store the return string
push @$outref,$output;
}
# now if not streaming process errors
if (($?) && (!defined($stream)))
{
$::RUNCMD_RC = $? >> 8;
my $displayerror = 1;
@@ -1470,7 +1495,8 @@ sub getTftpDir
=head3 getHomeDir
Get the path the user home directory from /etc/passwd.
If /etc/passwd returns nothing ( id maybe in LDAP) then
su - userid -c pwd to figure out where home is
Arguments:
none
Returns:
@@ -1481,6 +1507,7 @@ sub getTftpDir
none
Example:
$myHome = xCAT::Utils->getHomeDir();
$myHome = xCAT::Utils->getHomeDir($userid);
Comments:
none
@@ -1492,6 +1519,7 @@ sub getHomeDir
{
my ($class, $username) = @_;
my @user;
my $homedir;
if ($username)
{
@user = getpwnam($username);
@@ -1499,8 +1527,16 @@ sub getHomeDir
else
{
@user = getpwuid($>);
$username=$user[0];
}
return $user[7];
if ($user[7]) { # if homedir
$homedir= $user[7];
} else { # no home
$homedir=`su - $username -c pwd`;
chop $homedir;
}
return $homedir;
}
#--------------------------------------------------------------------------------
@@ -1628,7 +1664,12 @@ sub setupSSH
print FILE "#!/bin/sh
umask 0077
home=`egrep \"^$to_userid:\" /etc/passwd | cut -f6 -d :`
dest_dir=\"\$home/.ssh\"
if [ $home ]; then
dest_dir=\"\$home/.ssh\"
else
home=`su - root -c pwd`
dest_dir=\"\$home/.ssh\"
fi
mkdir -p \$dest_dir
cat /tmp/$to_userid/.ssh/authorized_keys >> \$home/.ssh/authorized_keys 2>&1
cp /tmp/$to_userid/.ssh/id_rsa \$home/.ssh/id_rsa 2>&1
@@ -1910,6 +1951,11 @@ sub bldnonrootSSHFiles
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
}
my $home = xCAT::Utils->getHomeDir($from_userid);
# Handle non-root userid may not be in /etc/passwd maybe LDAP
if (!$home) {
$home=`su - $from_userid -c pwd`;
chop $home;
}
my $roothome = xCAT::Utils->getHomeDir("root");
if (xCAT::Utils->isMN()) { # if on Management Node
if (!(-e "$home/.ssh/id_rsa.pub"))
@@ -2429,6 +2475,8 @@ sub my_ip_facing
$peer = shift;
}
return my_ip_facing_aix( $peer) if ( $^O eq 'aix');
my $peernumber = inet_aton($peer); #TODO: IPv6 support
unless ($peernumber) { return undef; }
my $noden = unpack("N", inet_aton($peer));
my @nets = split /\n/, `/sbin/ip addr`;
foreach (@nets)
@@ -2806,6 +2854,15 @@ sub nodeonmynet
=head3 getNodeIPaddress
Arguments:
Node name only one at a time
Returns: ip address(s)
Globals:
none
Error:
none
Example: my $c1 = xCAT::Utils::getNodeIPaddress($nodetocheck);
=cut
#-------------------------------------------------------------------------------
@@ -2836,8 +2893,25 @@ sub getNodeIPaddress
my $type = xCAT::DBobjUtils->getnodetype($nodetocheck);
if ($type) {
if ($type eq "frame" or $type eq "cec") {
$c1 = xCAT::DBobjUtils->getchildren($nodetocheck);
# Read the ppc table for any entry that
# has parent=nodename and nodetype fsp or bpa
my $ppctab = xCAT::Table->new( 'ppc' );
my @ps = $ppctab->getAllNodeAttribs(['node','parent','nodetype']);
my $parent;
my $node;
my $type;
#search for addresses
for my $entry ( @ps ) {
$parent = $entry->{parent};
$node = $entry->{node};
$type = $entry->{nodetype};
if (defined($parent) and $parent eq $nodetocheck ) {
if ( defined($type) and $type eq 'fsp' or $type eq 'bpa'){
push @$c1,$node;
}
}
}
#if $port exists, only for mkhwconn ... CEC/Frame
if ( defined($port) ) {
my @fsp_bpa = @$c1;
@@ -2932,8 +3006,124 @@ sub getNodeIPaddress
return undef;
}
}
#-------------------------------------------------------------------------------
=head3 getIPaddress - Used by DFM related functions to support service vlan redundancy.
Arguments:
Node name only one at a time
Returns: ip address(s)
Globals:
none
Error:
none
Example: my $c1 = xCAT::Utils::getIPaddress($nodetocheck);
=cut
#-------------------------------------------------------------------------------
sub getIPaddress
{
require xCAT::Table;
my $nodetocheck = shift;
my $port = shift;
my $side = "[A|B]";
if (!defined($port)) {
$port = "[0|1]";
}
# only need to parse IP addresses for Frame/CEC/BPA/FSP
my $type = xCAT::DBobjUtils->getnodetype($nodetocheck);
if ($type) {
my @children;
my %node_side_pairs = ();
my $children_num = 0;
my $parent;
my $ppctab = xCAT::Table->new( 'ppc' );
my $vpdtab = xCAT::Table->new( 'vpd' );
if ($type eq "bpa" or $type eq "fsp") {
my $tmp_p = $ppctab->getNodeAttribs($nodetocheck, ['parent']);
if ($tmp_p and $tmp_p->{parent}) {
$parent = $tmp_p->{parent};
} else {
return undef;
}
my $tmp_s = $vpdtab->getNodeAttribs($nodetocheck, ['side']);
if ($tmp_s->{side} and ($tmp_s->{side} =~ /(A|B)-\d/i)) {
$side = $1; # get side for the fsp, in order to get its brothers
} else {
return -3;
}
} elsif ($type eq "frame" or $type eq "cec") {
$parent = $nodetocheck;
} else {
return undef;
}
my @ps = $ppctab->getAllNodeAttribs(['node','parent','nodetype']);
my $tmp_parent;
my $tmp_node;
my $tmp_type;
#search for $nodetocheck's children or brothers
for my $entry ( @ps ) {
$tmp_parent = $entry->{parent};
$tmp_node = $entry->{node};
$tmp_type = $entry->{nodetype};
if ($tmp_parent and ($tmp_parent eq $parent) ) {
if (!defined($tmp_type)) {
$tmp_type = xCAT::DBobjUtils->getnodetype($tmp_node);
}
if ($tmp_type and ($tmp_type eq 'fsp' or $tmp_type eq 'bpa')) {
push @children, $tmp_node;
}
}
}
foreach my $tmp_n( @children) {
my $ent = $vpdtab->getNodeAttribs($tmp_n, ['side']);
if ($ent->{side} and $ent->{side} =~ /^$side-$port$/i) {
my $tmp_s = $ent->{side};
$tmp_s =~ s/a/A/;
$tmp_s =~ s/b/B/;
if (isIpaddr($tmp_n)) {
$node_side_pairs{$tmp_s} = $tmp_n;
$children_num++;
} else {
my $tmpip = xCAT::NetworkUtils->getipaddr($tmp_n);
if (!$tmpip) {
my $hoststab = xCAT::Table->new( 'hosts' );
my $tmp = $hoststab->getNodeAttribs($tmp_n, ['ip']);
if ($tmp->{ip}) {
$tmpip = $tmp->{ip};
}
}
if ($tmpip) {
$node_side_pairs{$tmp_s} = $tmpip;
$children_num++;
}
} # end of parse IP address for a fsp/bpa
} # end of parse a child's side
} #end of loop for children
if ($children_num == 0) {
return undef; #no children or brothers for this node.
}
my @keys = qw(A-0 A-1 B-0 B-1);
my $out_strings = undef;
foreach my $tmp (@keys) {
if (!$node_side_pairs{$tmp}) {
$node_side_pairs{$tmp} = '';
}
}
$out_strings = $node_side_pairs{"A-0"}.','.$node_side_pairs{"A-1"}.','.$node_side_pairs{"B-0"}.','.$node_side_pairs{"B-1"};
return $out_strings;
} else {
return undef;
}
}
#-------------------------------------------------------------------------------
@@ -3534,7 +3724,10 @@ sub get_site_Master
=head3 get_ServiceNode
Will get the Service node ( name or ipaddress) as known by the Management
Server or Node for the input nodename or ipadress of the node
Node or Node for the input nodename or ipadress of the node
which can be a Service Node.
If the input node is a Service Node then it's Service node
is always the Management Node.
input: list of nodenames and/or node ipaddresses (array ref)
service name
@@ -3568,6 +3761,7 @@ sub get_ServiceNode
{
require xCAT::Table;
my ($class, $node, $service, $request) = @_;
my @node_list = @$node;
my $cmd;
my %snhash;
@@ -3576,8 +3770,8 @@ sub get_ServiceNode
my $nodehmtab;
my $noderestab;
my $snattribute;
my $oshash;
my $nodetab;
my $oshash;
my $nodetab;
$::ERROR_RC = 0;
# determine if the request is for the service node as known by the MN
@@ -3586,33 +3780,15 @@ sub get_ServiceNode
if ($request eq "MN")
{
$snattribute = "servicenode";
}
else # Node
{
$snattribute = "xcatmaster";
}
my $master =
xCAT::Utils->get_site_Master(); # read the site table, master attrib
my $nimprime;
if (xCAT::Utils->isAIX()) {
# for AIX nodes the NIM primary will be either the site.NIMprime attr
# or, if not set, the site.master attr
$nimprime = xCAT::InstUtils->getnimprime();
chomp $nimprime;
}
# $master and $nimprime is possible to be the same (MN)
# but $master is IP addr, $nimprime is short hostname
# this results in %snhash may have two keys duplicated.
# so use ip for nimprime.
my $nimprimeip = xCAT::NetworkUtils->getipaddr($nimprime);
$nimprime = $nimprimeip;
# get site.master this will be the default
my $master = xCAT::Utils->get_site_Master();
$noderestab = xCAT::Table->new('noderes');
$nodetab = xCAT::Table->new('nodetype');
unless ($noderestab) # no noderes table, use default site.master
{
@@ -3621,17 +3797,10 @@ sub get_ServiceNode
if ($master) # use site Master value
{
if ($nodetab) {
$oshash = $nodetab->getNodesAttribs(\@node_list, ["os"]);
}
foreach my $node (@node_list)
{
if ( ($oshash->{$node}->[0]->{os}) && ($oshash->{$node}->[0]->{os} eq "AIX")) {
push @{$snhash{$nimprime}}, $node;
} else {
push @{$snhash{$master}}, $node;
}
}
}
else
@@ -3640,9 +3809,6 @@ sub get_ServiceNode
$::ERROR_RC = 1;
}
if ($nodetab) {
$nodetab->close;
}
return \%snhash;
}
@@ -3651,30 +3817,24 @@ sub get_ServiceNode
$nodehash = $noderestab->getNodesAttribs(\@node_list, [$snattribute]);
$oshash = $nodetab->getNodesAttribs(\@node_list, ["os"]);
foreach my $node (@node_list)
{
foreach my $rec (@{$nodehash->{$node}})
{
if ($rec and $rec->{$snattribute})
if ($rec and $rec->{$snattribute}) # use noderes.servicenode
{
my $key = $rec->{$snattribute};
push @{$snhash{$key}}, $node;
}
else
else # use site.master
{
if ( ($oshash->{$node}->[0]->{os}) && ($oshash->{$node}->[0]->{os} eq "AIX")) {
push @{$snhash{$nimprime}}, $node;
} else {
push @{$snhash{$master}}, $node;
}
push @{$snhash{$master}}, $node;
}
}
}
$noderestab->close;
$nodetab->close;
return \%snhash;
}
@@ -4909,6 +5069,19 @@ sub osver
$ver =~ tr/\.//;
$ver =~ s/[^0-9]*([0-9]+).*/$1/;
}
elsif (-f "/etc/lsb-release")#ubuntu
{
$os = "ubuntu";
open($relfile,"<","/etc/lsb-release");
my @text = <$relfile>;
close($relfile);
foreach (@text){
if ( $_ =~ /DISTRIB_RELEASE=(\S+)/ ) {
$ver = $1;
}
}
}
$os = "$os" . "$ver";
return ($os);
}
@@ -6233,6 +6406,7 @@ sub setAppStatus
my %new_nodeappstat;
foreach my $node (keys %$nodeappstat) {
if ( $node =~ /^\s*$/ ) { next; } # Skip blank node names
my $new_appstat = "";
my $changed = 0;
@@ -6408,188 +6582,38 @@ sub enablessh
return $enablessh;
}
#-------------------------------------------------------------------------------
=head3 runcmd_S
Note this routine is being used solely by genimage to steam output. It
will be merged with runcmd in a later release. Not all paths have been
tested.
Right now requires $cmd and $::CALLBACK set
Run the given cmd and return the output in an array (already chopped).
This routine in addition streams the output to the $::CALLBACK which is
required input.
Alternately, if this function is used in a scalar context, the output
is joined into a single string with the newlines separating the lines.
Arguments:
command, exitcode and reference to output
Returns:
see below
Globals:
$::RUNCMD_RC , $::CALLBACK
Error:
Normally, if there is an error running the cmd,it will display the
error and exit with the cmds exit code, unless exitcode
is given one of the following values:
0: display error msg, DO NOT exit on error, but set
$::RUNCMD_RC to the exit code.
-1: DO NOT display error msg and DO NOT exit on error, but set
$::RUNCMD_RC to the exit code.
-2: DO the default behavior (display error msg and exit with cmds
exit code.
number > 0: Display error msg and exit with the given code
Example:
my $outref = xCAT::Utils->runcmd($cmd, -2, 1);
Comments:
If refoutput is true, then the output will be returned as a
reference to an array for efficiency.
=head3 isSELINUX
Returns:
returns 0 if SELINUX is enabled
returns 1 if SELINUX is not enabled
Globals:
none
Error:
none
Example:
if (xCAT::Utils->isSELINUX()) { blah; }
Comments:
This is tested on Redhat, may need more for SLES
=cut
#-------------------------------------------------------------------------------
sub runcmd_S
sub isSELINUX
{
my ($class, $cmd, $exitcode, $refoutput) = @_;
$::RUNCMD_RC = 0;
# redirect stderr to stdout
if (!($cmd =~ /2>&1$/)) { $cmd .= ' 2>&1'; }
if ($::VERBOSE)
{
# get this systems name as known by xCAT management node
my $Sname = xCAT::InstUtils->myxCATname();
my $msg;
if ($Sname) {
$msg = "Running command on $Sname: $cmd";
} else {
$msg="Running command: $cmd";
}
if ($::CALLBACK){
my $rsp = {};
$rsp->{data}->[0] = "$msg\n";
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
} else {
xCAT::MsgUtils->message("I", "$msg\n");
}
}
# steam output to $::CALLBACK and return the buffer
my @cmd;
push @cmd,$cmd;
my $outref = [];
my $outreferr = [];
my $cmdin;
my $cmdout;
my $cmderr = gensym;
my $cmdpid = open3($cmdin,$cmdout,$cmderr,@cmd);
my $cmdsel = IO::Select->new($cmdout,$cmderr);
#foreach (@indata) {
# print $cmdin $_;
#}
close($cmdin);
my @handles;
my $rsp = {};
my $output;
my $errout;
while ($cmdsel->count()) {
@handles = $cmdsel->can_read();
foreach (@handles) {
my $line;
my $done = sysread $_,$line,180;
if ($done) {
if ($_ eq $cmdout) {
$rsp->{data}->[0] = $line;
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK, 0);
#push @$outref,$line;
$output .= $line;
} else {
$rsp->{data}->[0] = $line;
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK, 0);
#push @$outreferr,$line;
$errout .= $line;
}
} else {
$cmdsel->remove($_);
close($_);
}
}
if (-e "/usr/sbin/selinuxenabled") {
`/usr/sbin/selinuxenabled`;
if ($? == 0) {
return 0;
} else {
return 1;
}
} else {
return 1;
}
waitpid($cmdpid,0);
# store the return string
push @$outref,$output;
if ($?)
{
$::RUNCMD_RC = $? >> 8;
my $displayerror = 1;
my $rc;
if (defined($exitcode) && length($exitcode) && $exitcode != -2)
{
if ($exitcode > 0)
{
$rc = $exitcode;
} # if not zero, exit with specified code
elsif ($exitcode <= 0)
{
$rc = ''; # if zero or negative, do not exit
if ($exitcode < 0) { $displayerror = 0; }
}
}
else
{
$rc = $::RUNCMD_RC;
} # if exitcode not specified, use cmd exit code
if ($displayerror)
{
my $rsp = {};
my $errmsg = '';
if (xCAT::Utils->isLinux() && $::RUNCMD_RC == 139)
{
$errmsg = "Segmentation fault $errmsg";
}
else
{
$errmsg = join('', @$outref);
chomp $errmsg;
}
if ($::CALLBACK)
{
$rsp->{data}->[0] =
"Command failed: $cmd. Error message: $errmsg.\n";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
}
else
{
xCAT::MsgUtils->message("E",
"Command failed: $cmd. Error message: $errmsg.\n");
}
$xCAT::Utils::errno = 29;
}
}
if ($refoutput)
{
chomp(@$outref);
return $outref;
}
elsif (wantarray)
{
chomp(@$outref);
return @$outref;
}
else
{
my $line = join('', @$outref);
chomp $line;
return $line;
}
}
#-------------------------------------------------------------------------------
1;
+155
View File
@@ -0,0 +1,155 @@
#!/bin/ksh
trap "chmod 774 /etc/rc.tcpip" INT QUIT TERM EXIT
#NB: WANT TO ADD THIS BACK IN AT SOME POINT - SYSTEM HANG DETECTION DEAMON
#shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
rmitab shdaemon > /dev/null 2>&1
#to disable topasrec, which runs as a cron job, need remove the following entry from /etc/inittab:
#xmdaily:2:once:/usr/bin/topasrec -L -s 300 -R 1 -r 6 -o /etc/perf/daily/ -ypersistent=1 2>&1 >/dev/null #Start local binary recording
rmitab xmdaily > /dev/null 2>&1
#to disable PM data collection, which is really topasout, run:
#55 23 * * * /var/perf/pm/bin/pmcfg >/dev/null 2>&1 #Enable PM Data Collection
rmitab pmcfg > /dev/null 2>&1
#to disable USB audio device overhead
#naudio2::boot:/usr/sbin/naudio2 > /dev/null
#naudio::boot:/usr/sbin/naudio > /dev/null
rmitab naudio > /dev/null 2>&1
rmitab naudio2 > /dev/null 2>&1
#not planning on printing from P7IH:
#piobe:2:wait:/usr/lib/lpd/pioinit_cp >/dev/null 2>&1 # pb cleanup
rmitab piobe > /dev/null 2>&1
#qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
rmitab qdaemon > /dev/null 2>&1
#do we really need wpar support now?
rcwpars:2:once:/etc/rc.wpars > /dev/console 2>&1 # Corrals autostart
rmitab rcwpars > /dev/null 2>&1
#have always seen this disabled in the past
#perfstat:2:once:/usr/lib/perf/libperfstat_updt_dictionary >/dev/console 2>&1
rmitab perfstat > /dev/null 2>&1
#we aren't running GSA on PERCS machines. . .
#gsa_updmn:2:wait:startsrc -s gsa_updmn > /dev/console 2>&1
rmitab gsa_updmn > /dev/null 2>&1
#unless we really are using this we should disable for perf testing
#artex:2:wait:/usr/sbin/artexset -c -R /etc/security/artex/config/master_profile.xml > /dev/console 2>&1
rmitab artex > /dev/null 2>&1
#this is HACMP function . . .
#clcomd:23456789:once:/usr/bin/startsrc -s clcomd
rmitab clcomd > /dev/null 2>&1
#rpvserver:2:once:/etc/rc.rpvserver > /dev/console 2>&1
rmitab rpvserver > /dev/null 2>&1
#ha_star:h2:once:/etc/rc.ha_star >/dev/console 2>&1
rmitab ha_star > /dev/null 2>&1
#clusterconf:23456789:once:/usr/sbin/clusterconf
rmitab clusterconf > /dev/null 2>&1
#this is for http://<hostname>:5335/ibm/console access, which we don't want for PERCS
#pconsole:2:once:/usr/bin/startsrc -s pconsole > /dev/null 2>&1
rmitab pconsole > /dev/null 2>&1
#contains Network load balancing kernel extensions . . . not clear for HPC yet
#rcnetwlm:23456789:wait:/etc/rc.netwlm start> /dev/console 2>&1 # Start netwlm
rmitab rcnetwlm > /dev/null 2>&1
#to disable cimservices, need to comment cimservices and platform agent:
#cimservices:2:once:/usr/bin/startsrc -s cimsys >/dev/null 2>&1
#platform_agent:2:once:/usr/bin/startsrc -s platform_agent >/dev/null 2>&1
rmitab cimservices > /dev/null 2>&1
rmitab platform_agent > /dev/null 2>&1
#we WILL want to add in RMC (RSCT) monitoring at some point
#ctrmc:2:once:/usr/bin/startsrc -s ctrmc > /dev/console 2>&1
rmitab ctrmc > /dev/null 2>&1
#Jugement call . . . leave in for now
#diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
#for NIM so keep for now
#mount_tools:2:once:/usr/bin/mount_tools iofnim.austin.ibm.com > /dev/console 2>&1
#following are needed for HPC so leave:
#rcsciv1:23456789:wait:/usr/bin/startsrc -s scidv1 > /dev/console 2>&1
#pnsd:2345:once:/opt/rsct/lapi/pnsd/startpnsdAIX 1>/dev/null 2>&1
#dscrset:2:once:/usr/sbin/dscrctl -n -s 30 >/dev/null 2>/dev/console
#to disable sendmail daemon, need to comment the line in /etc/rc.tcpip that begins: start /usr/lib/sendmail
#As of 11/16/10 John L. re-enable sendmail as some subsystems want to use this for PERCS
#Unless someone says we need it, it's back off - 4/18/11 John L.
grep -q "^start /usr/lib/sendmail" /etc/rc.tcpip
if [[ $? -eq 0 ]] then
cat /etc/rc.tcpip | sed 's/^start \/usr\/lib\/sendmail/#start \/usr\/lib\/sendmail/' > /tmp/rc.tcpip.tmpfile.$$
cp -p /etc/rc.tcpip /etc/rc.tcpip.prev
mv /tmp/rc.tcpip.tmpfile.$$ /etc/rc.tcpip
fi
stopsrc -s sendmail > /dev/null 2>&1
#to disable aixmibd daemon, need to comment the line in /etc/rc.tcpip that begins: start /usr/sbin/aixmibd
grep -q "^start /usr/sbin/aixmibd" /etc/rc.tcpip
if [[ $? -eq 0 ]] then
cat /etc/rc.tcpip | sed 's/^start \/usr\/sbin\/aixmibd/#start \/usr\/sbin\/aixmibd/' > /tmp/rc.tcpip.tmpfile.$$
cp -p /etc/rc.tcpip /etc/rc.tcpip.prev2
mv /tmp/rc.tcpip.tmpfile.$$ /etc/rc.tcpip
fi
stopsrc -s aixmibd > /dev/null 2>&1
#to disable hostmibd daemon, need to comment the line in /etc/rc.tcpip that begins: start /usr/sbin/hostmibd
grep -q "^start /usr/sbin/hostmibd" /etc/rc.tcpip
if [[ $? -eq 0 ]] then
cat /etc/rc.tcpip | sed 's/^start \/usr\/sbin\/hostmibd/#start \/usr\/sbin\/hostmibd/' > /tmp/rc.tcpip.tmpfile.$$
cp -p /etc/rc.tcpip /etc/rc.tcpip.prev2
mv /tmp/rc.tcpip.tmpfile.$$ /etc/rc.tcpip
fi
stopsrc -s hostmibd > /dev/null 2>&1
#to disable snmpmibd daemon, need to comment the line in /etc/rc.tcpip that begins: start /usr/sbin/snmpmibd
grep -q "^start /usr/sbin/snmpmibd" /etc/rc.tcpip
if [[ $? -eq 0 ]] then
cat /etc/rc.tcpip | sed 's/^start \/usr\/sbin\/snmpmibd/#start \/usr\/sbin\/snmpmibd/' > /tmp/rc.tcpip.tmpfile.$$
cp -p /etc/rc.tcpip /etc/rc.tcpip.prev2
mv /tmp/rc.tcpip.tmpfile.$$ /etc/rc.tcpip
fi
stopsrc -s snmpmibd > /dev/null 2>&1
chmod 774 /etc/rc.tcpip
#try to clean up some cron junk - we only touch the crontab file once (and save a backup)
if [[ ! -f /var/spool/cron/crontabs/root.before.clean_jitter ]] then
cp -p /var/spool/cron/crontabs/root /var/spool/cron/crontabs/root.before.clean_jitter
grep -v "bin\/pmcfg" /var/spool/cron/crontabs/root | grep -v "bin\/stcron" | grep -v "bin\/dumpctr" | \
grep -v "ras\/dumpcheck" > /var/spool/cron/crontabs/root.after.clean_jitter
cp /var/spool/cron/crontabs/root.after.clean_jitter /var/spool/cron/crontabs/root
fi
for i in $(ps -efk | grep "topasrec" | grep -v killproc | grep -v grep | awk ' {print $2} ') ; do
kill $i
done
ls -l /etc/rc.tcpip
telinit q
sleep 1
/usr/sbin/schedo -F -o tick_sync=1
/usr/sbin/schedo -F -o big_tick_size=1
grep -q cosched3 /etc/poe.priority 2> /dev/null
if [[ $? -ne 0 ]] then
echo '* cosched1 18 100 97 10' >> /etc/poe.priority
echo '* cosched2 13 100 99.5 10' >> /etc/poe.priority
echo '* cosched3 13 100 99 3' >> /etc/poe.priority
chmod 644 /etc/poe.priority
fi
@@ -0,0 +1,6 @@
compilers/vac.upc.cmp
compilers/vac.upc.help
compilers/vac.upc.lib
compilers/vac.upc.man
compilers/vac.upc.rte
compilers/vac.upc.rte.lnk
@@ -0,0 +1,32 @@
#!/bin/sh
#
# Sample script to accept licenses for the IBM upc compilers
# For AIX:
# do nothing, license accepted with installp -Y flag
# For Linux:
# Assumes all compiler software has been installed
OS=`uname`
if [ $OS != "AIX" ]; then
cd $installroot/
upc_script=`find opt/ibmcmp/upc -name new_install -print`
if [ $NODESETSTATE == "install" ] || [ $NODESETSTATE == "boot" ]; then
# Being run from a stateful install postscript
if [ -n "$upc_script" ] ; then
echo 1 | $upc_script
fi
fi
if [ $NODESETSTATE == "genimage" ]; then
# Being called from <image>.postinstall script
# Assume we are on the same machine
if [ -n "$upc_script" ] ; then
echo 1 | chroot $installroot /$upc_script
fi
fi
fi
@@ -60,7 +60,7 @@ if [ $OS != "AIX" ]; then
zypper -R $installroot rr gpfs_updates
else
# For Redhat, etc., assume yum is available on the system running genimage
yum --installroot $installroot --nogpgcheck localupdate $INSTALL_DIR/$UPDATES_DIR/*.rpm
yum -y --installroot $installroot --nogpgcheck localupdate $INSTALL_DIR/$UPDATES_DIR/*.rpm
fi
fi
fi
+12
View File
@@ -70,6 +70,18 @@ rm -rf $RPM_BUILD_ROOT
%changelog
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%preun
+64 -48
View File
@@ -246,6 +246,35 @@ if ($ENV{'DATABASELOC'}) # input where xcatdb is located
}
}
# check that they have not defined the databaseloc under the site.installoc
# directory, default /install. This is invalid because this directory
# is usually mounted on the Service Nodes. Error out if they do
# this is really the attribute in installdir which I will check.
my @installlocdir;
my $cmd = " XCATBYPASS=1 tabdump site | grep installdir";
my @installlocation = xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0)
{
(my $attr, my $installoc) = split(",", $installlocation[0]);
(my $q,my $installpt) = split("\"", $installoc); # remove quotes
@installlocdir = split '/', $installpt; # get the base directory
} else {
$installlocdir[1] = "install"; # default
}
# is it the same as the first directory in databaseloc
my @dblocdir = split '/', $::databaselocdir; # get the base directory
$installlocdir[1] =~ s/\s*//g; #remove blanks
$dblocdir[1] =~ s/\s*//g; #remove blanks
if ($installlocdir[1] eq $dblocdir[1] ) { # if they match,error
xCAT::MsgUtils->message("E", "The site databaseloc attribute is set to the directory or a sub-directory of the site table installloc or installdir attribute or the default of /install. This is not a supported configuration.");
exit(1);
}
if (!(-e $::databaselocdir)){ # if it does not exist, create it
my $cmd = "mkdir -p $::databaselocdir";
xCAT::Utils->runcmd($cmd, 0);
@@ -968,46 +997,6 @@ sub setupinstance
{
xCAT::MsgUtils->message("SI", " $cmd warning.");
}
# add export of EXTSHM to /etc/rc.db2 on AIX, so env variable will
# be exported when db2fmcd starts the database on reboot
my $message;
if ($::osname eq 'AIX') {
my $rcdb2file="/etc/rc.db2";
my $entry="EXTSHM=ON\nexport EXTSHM";
my $entry2="#!/usr/bin/ksh \nEXTSHM=ON\nexport EXTSHM";
if (-e($rcdb2file)) { # add to file
$cmd = "fgrep EXTSHM $rcdb2file"; # check to see if there
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) # if not there
{
$cmd = "echo \"$entry\" >> $rcdb2file";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
$message = "$cmd failed. Could not setup $rcdb2file. This will affect running ISNM on the system.";
xCAT::MsgUtils->message("E", "$message");
}
}
} else{ # create the file
$cmd = "echo \"$entry2\" >> $rcdb2file";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
$message = "$cmd failed. Could not setup $rcdb2file. This will affect running ISNM on the system. Please check documentation for manual setup. ";
xCAT::MsgUtils->message("E", "$message");
} else {
$cmd = "chmod 554 $rcdb2file";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("E", " $cmd failed.");
}
}
}
}
}
@@ -1067,27 +1056,39 @@ sub setupdb2env
}
else
{ # LInux
my $cmd = "egrep -i \"DB2INSTANCE\" /etc/profile.d/xcat.sh";
my $cmd = "egrep -i \"DB2INSTANCE\" /etc/profile.d/xcatdb2.sh";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0)
{ # if not already there
open(FILE, ">>/etc/profile.d/xcat.sh")
or die "cannot open file /etc/profile.d/xcat.sh\n";
open(FILE, ">>/etc/profile.d/xcatdb2.sh")
or die "cannot open file /etc/profile.d/xcatdb2.sh\n";
print FILE "export DB2INSTANCE=xcatdb \n";
print FILE "export EXTSHM=ON \n";
close FILE;
}
my $cmd = "egrep -i \"DB2INSTANCE\" /etc/profile.d/xcat.csh";
my $cmd = "egrep -i \"DB2INSTANCE\" /etc/profile.d/xcatdb2.csh";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0)
{ # if not already there
open(FILE, ">>/etc/profile.d/xcat.csh")
or die "cannot open file /etc/profile.d/xcat.csh\n";
open(FILE, ">>/etc/profile.d/xcatdb2.csh")
or die "cannot open file /etc/profile.d/xcatdb2.csh\n";
print FILE "setenv DB2INSTANCE \"xcatdb\" \n";
print FILE "setenv EXTSHM \"ON\" \n";
close FILE;
}
$cmd = "chmod 755 /etc/profile.d/xcatdb2.sh";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("SE", " $cmd failed.");
}
$cmd = "chmod 755 /etc/profile.d/xcatdb2.csh";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("SE", " $cmd failed.");
}
my $path = $::installdb2dir;
$path .="\/lib64";
# add path of db2 libraries to ld.so.conf
@@ -1955,7 +1956,7 @@ sub adddb2paths
}
else #Linux
{
my $profname = "/etc/profile.d/xcat.sh";
my $profname = "/etc/profile.d/xcatdb2.sh";
my $cmd = qq~cat $profname | grep "db2"~;
my $outref = xCAT::Utils->runcmd("$cmd", -1);
if ($::RUNCMD_RC != 0)
@@ -1980,7 +1981,7 @@ sub adddb2paths
xCAT::MsgUtils->message('E', "Could not update $profname.");
}
}
my $profname = "/etc/profile.d/xcat.csh";
my $profname = "/etc/profile.d/xcatdb2.csh";
my $cmd = qq~cat $profname | grep "db2"~;
my $outref = xCAT::Utils->runcmd("$cmd", -1);
if ($::RUNCMD_RC != 0)
@@ -2004,6 +2005,19 @@ sub adddb2paths
{
xCAT::MsgUtils->message('E', "Could not update $profname.");
}
# set correct permissions
$cmd = "chmod 755 /etc/profile.d/xcatdb2.sh";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("SE", " $cmd failed.");
}
$cmd = "chmod 755 /etc/profile.d/xcatdb2.csh";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
xCAT::MsgUtils->message("SE", " $cmd failed.");
}
}
}
}
@@ -2013,6 +2027,8 @@ sub adddb2paths
remove DB2 on management node or service node. if you want to remove it
from service node, you should use -s and -r flag together.
Note this function is not supported and the code has not been
kept up to date
=cut
+2
View File
@@ -49,12 +49,14 @@ my $mode;
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>]'."\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>] <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";
print "Examples:\n";
print " genimage\n";
print " genimage -i eth0 -n tg3 -o sles11 -p compute\n";
print " genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute\n";
print " genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute\n";
+2 -2
View File
@@ -186,7 +186,7 @@ if (-e ("/etc/xcat/cfgloc")) # check to see if xcat is using mysql
if ($::INIT)
{
my $message =
"The /opt/xcat/cfgloc file is already configured for MySQL. xcat database initialization will not take place.";
"The /etc/xcat/cfgloc file is already configured for MySQL. xcat database initialization will not take place.";
xCAT::MsgUtils->message("I", "$message");
}
$::xcatrunningmysql = 1;
@@ -475,7 +475,7 @@ sub setulimits
print LIMITSTMP " data= -1\n";
print LIMITSTMP " rss= -1\n";
print LIMITSTMP " stack= -1\n";
print LIMITSTMP " nofiles= -1\n";
print LIMITSTMP " nofiles= 102400\n";
print LIMITSTMP "\n";
$rootstanza = 1;
}
+4 -1
View File
@@ -118,7 +118,10 @@ foreach my $interf (@interfaces) {
if ($interf) {
# make a copy of the node list and add the interface on
$noderef = [ @nodes ];
foreach (@$noderef) { s/$/-$interf/; }
foreach (@$noderef) {
s/-hf\d$//;
s/$/-$interf/;
}
}
else {
$noderef = \@nodes; # use the original node list
+4 -3
View File
@@ -10,7 +10,7 @@ use Cwd;
use File::Basename;
use xCAT::MsgUtils;
use xCAT::Client;
use strict;
use Getopt::Std;
my $bname = basename($0);
@@ -54,8 +54,9 @@ else
$cmdref->{cwd}->[0] = cwd();
# get info from files piped in as stdin
my $data;
if (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/))
if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM'}) )
{
my $rout;
my $rin="";
vec($rin,fileno(STDIN),1)=1;
my $nfound=select($rout=$rin,"","",1);
@@ -112,7 +113,7 @@ my @checkcmds = ("nimnodeset", "mkdsklsnode", "rmdsklsnode", "xcat2nim", "nimnod
if (grep(/^$bname$/, @checkcmds) ) {
# strip off all options
# use getopt instead of getopts to let long options pass through
getopt('bdismotp');
getopt('dismot');
# check the operands for a noderange
while (my $a = shift(@ARGV)) {
if (!($a =~ /=/) && !($a =~ /^-/)) {
+19 -8
View File
@@ -70,6 +70,7 @@ location=""
osimage=""
cmd_string=""
verbose=0
error=0
usage="Usage:\n\txcatchroot -h\n\txcatchroot [-V] -i osimage cmd_string"
@@ -254,7 +255,19 @@ else
then
echo "Running command: ${chroot} /usr/xcatchrootscript\n"
fi
${chroot} /usr/xcatchrootscript
msg=`${chroot} /usr/xcatchrootscript`
rc=$?
echo "\n\n$msg\n\n"
if [ ${rc} -ne 0 ]
then
error=1
echo "\nError: The chroot command failed for '$cmd_string'."
echo "Error: The return code from chroot was '${rc}'\n"
fi
# sensitive process has completed
${M_CHATTR} -a Rstate=available $spotObj
@@ -268,13 +281,11 @@ else
fi
# remove the tmp script
if [ $verbose -eq 1 ]
then
echo "Running command: 'rm $location/xcatchrootscript'\n"
fi
`rm $location/xcatchrootscript`
# echo "\nNote: Be sure to perform the NIM check operation after completing NIM spot\nupdates. (ex. 'nim -o check <spot_name>')"
/usr/bin/rm $location/xcatchrootscript
# all done
if [ $error -eq 1 ]
then
exit 1
fi
exit 0
+22 -5
View File
@@ -16,18 +16,35 @@ use Cwd;
use File::Basename;
#use Data::Dumper;
use xCAT::Client;
use strict;
my $bname = basename($0);
my $cmdref;
if ($bname =~ /xcatclient/) { $cmdref->{command}->[0]=shift @ARGV; } # xcatclient was invoked directly and the 1st arg is cmd name that is used to locate the plugin
else { $cmdref->{command}->[0] = $bname; } # the cmd was sym linked to xcatclient
$cmdref->{cwd}->[0] = cwd();
if (-p STDIN) {
my $data;
while ( <STDIN> ) { $data.=$_; }
$cmdref->{stdin}->[0]=$data;
my $data;
# allows our plugins to get the stdin of the cmd that invoked the plugin
if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM'}) )
{
my $rin="";
my $rout;
vec($rin,fileno(STDIN),1)=1;
my $nfound=select($rout=$rin,"","",1);
if ($nfound)
{
while ( <STDIN> ) { $data.=$_; }
$cmdref->{stdin}->[0]=$data;
}
}
else
{
if (-p STDIN) {
while ( <STDIN> ) { $data.=$_; }
$cmdref->{stdin}->[0]=$data;
}
}
my $arg;
my @tmpargv = @ARGV;
+22 -5
View File
@@ -11,18 +11,35 @@ use lib "$::XCATROOT/lib/perl";
use Cwd;
use File::Basename;
use xCAT::Client;
use strict;
my $bname = basename($0);
my $cmdref;
if ($bname =~ /xcatclientnnr/) { $cmdref->{command}->[0]=shift @ARGV; } # xcatclientnnr was invoked directly and the 1st arg is cmd name that is used to locate the plugin
else { $cmdref->{command}->[0] = $bname; } # the cmd was sym linked to xcatclientnnr
$cmdref->{cwd}->[0] = cwd();
if (-p STDIN) {
my $data;
while ( <STDIN> ) { $data.=$_; }
$cmdref->{stdin}->[0]=$data;
my $data;
# allows our plugins to get the stdin of the cmd that invoked the plugin
if ( (($^O =~ /^linux/i) && ($ENV{'SHELL'} =~ /\/ksh$/)) || !defined($ENV{'TERM'}) )
{
my $rout;
my $rin="";
vec($rin,fileno(STDIN),1)=1;
my $nfound=select($rout=$rin,"","",1);
if ($nfound)
{
while ( <STDIN> ) { $data.=$_; }
$cmdref->{stdin}->[0]=$data;
}
}
else
{
if (-p STDIN) {
while ( <STDIN> ) { $data.=$_; }
$cmdref->{stdin}->[0]=$data;
}
}
push (@{$cmdref->{arg}}, @ARGV);
foreach (keys %ENV) {
+5 -4
View File
@@ -12,8 +12,8 @@ B<cfm2xcat> [B<-h>]
=head1 B<DESCRIPTION>
Copy the cfm2xcat command to the CSM Management Server. Run the command, indicating where you want your files saved with the -i and -o flags. They can be in the same directory.
The cfm2xcat command will run cfmupdatenode -a, saving the generated CFM distribution files. From those distribution files, it will generate xdcp rsync input files (-F option on xdcp).
Check the rsync files generated. There will be a file generated from the input -o option on the command, and the same file with a (.nr) extension generated for each different noderange that will used to sync files based on your CFM setup in CSM. The file will contain the rsync file list. The file.nr will contain the noderange. If multiple noderanges then the input name will be appended with a number.
The cfm2xcat command will run cfmupdatenode -a, saving the generated CFM distribution files in the directory indicates with (-i). From those distribution files, it will generate xdcp rsync input files (-F option on xdcp) in the directory indicated by ( -o).
Check the rsync files generated. There will be a file generated (rsyncfiles) from the input -o option on the command, and the same file with a (.nr) extension generated for each different noderange that will used to sync files based on your CFM setup in CSM. The rsyncfiles will contain the rsync file list. The rsyncfiles.nr will contain the noderange. If multiple noderanges then the file name (rsyncfiles) will be appended with a number.
=head1 OPTIONS
@@ -37,10 +37,11 @@ B<-o> Path of the xdcp rsync input file generated from the CFM distribu
B<cfm2xcat -i /tmp/cfm/cfmdistfiles -o /tmp/cfm/rsyncfiles>
2. To use the file on the xCAT Management Node, after copying to /tmp/cfm:
2. To use the file on the xCAT Management Node copy to /tmp/cfm on the xCAT MN:
B<xdcp ^/tmp/cfm/rsyncfiles.nr -F /tmp/cfm/rsyncfiles>
B<xdcp ^/tmp/cfm/rsyncfiles.nr1 -F /tmp/cfm/rsyncfiles1>
B<xdcp ^/tmp/cfm/rsyncfiles.nr2 -F /tmp/cfm/rsyncfiles2>
=head1 FILES
+7 -1
View File
@@ -96,7 +96,7 @@ Indicates that the file being piped to the command is in stanza format. See the
To change a site definition.
chdef -t site -o clustersite rsh=/bin/rsh rcp=/bin/rcp installdir=/xcatinstall
chdef -t site -o clustersite installdir=/xcatinstall
=item 2.
@@ -154,6 +154,12 @@ To change the node hwtype, this command will change the value of ppc.nodetype.
chdef -t node -o node1 hwtype=lpar
=item 11.
To change the policy table for policy number 7.0 for admin1
chdef -t policy -o 7.0 name=admin1 rule=allow
=back
+5
View File
@@ -21,6 +21,11 @@ The command gets the name of the lpp_source resource from the xCAT osimage
definition and the location of the lpp_source directory from the NIM resource
definition.
It will check for installp, rpm and emgr type packages.
Note: Remember to use the prefixes, "I:", "R:", and "E:", respectively,
when specifying package names in an installp_bundle file or an otherpkgs list.
In addition to checking for missing software the chkosimage command will
also check to see if there are multiple matches. This could happen
when you use wildcards in the software file names. For example, if you
+4 -4
View File
@@ -90,7 +90,7 @@ Starting numeric id of the newly created partitions. For Power 775 using Direct
=item B<-m>
memory interleaving. The value only could be B<interleaved> or B<non-interleaved>. B<non-interleaved> mode means the memory cannot be shared across the processors in an octant. B<interleaved> means the memory can be shared. The default value is B<non-interleaved> .
memory interleaving. The setting value only could be B<1> or B<2>. B<2> means B<non-interleaved> mode (also 2MC mode), the memory cannot be shared across the processors in an octant. B<1> means B<interleaved> mode (also 8MC mode) , the memory can be shared. The default value is B<1> .
=item B<-r>
@@ -190,7 +190,7 @@ Output is similar to:
then:
chvm lpar1 -i 1 -m non-interleaved -r 0:1
chvm lpar1 -i 1 -m 1 -r 0:1
Output is similar to:
@@ -203,7 +203,7 @@ Output is similar to:
then:
chvm lpar1-lpar8 -i 1 -m non-interleaved -r 0-7:1
chvm lpar1-lpar8 -i 1 -m 1 -r 0-7:1
Output is similar to:
@@ -223,7 +223,7 @@ Output is similar to:
then:
chvm lpar1-lpar9 -i 1 -m non-interleaved -r 0:5,1-7:1
chvm lpar1-lpar9 -i 1 -m 1 -r 0:5,1-7:1
Output is similar to:
+23 -2
View File
@@ -6,12 +6,18 @@ B<dumpxCATdb> - dumps the xCAT db tables .
B<dumpxCATdb> [B<-a>] [B<-V>] [{B<-p>|B<--path>} I<path>]
B<dumpxCATdb> [B<-b>] [B<-V>] [{B<-p>|B<--path>} I<path>]
B<dumpxCATdb> [B<-h>|B<--help>] [B<-v>|B<--version>]
=head1 DESCRIPTION
The dumpxCATdb command creates .csv files for xCAT database tables and puts them in the directory given by the -p flag. These files can be used by the restorexCATdb command to restore the database. The command will read the list of tables in the site.skiptables attribute and not backup those tables.
If not using the binary dump option (-b), then the dumpxCATdb command creates .csv files for xCAT database tables and puts them in the directory given by the -p flag. These files can be used by the restorexCATdb command to restore the database. The command will read the list of tables in the site.skiptables attribute and not backup those tables.
Supports using XCAT_SKIPTABLES env variable to provide a list of skip tables.
The command will never backup TEAL or ISNM tables, except isnm_config. To dump TEAL tables use the documented process for TEAL. For ISNM use tabdump, after using tabprune to get to prune unnecessary records.
If using the binary dump option for the DB2 database, then the routine will use the Database provide utilites for backup of the entire DB2 database.
=head1 OPTIONS
@@ -24,6 +30,8 @@ B<-V> Verbose.
B<-a> All,without this flag the eventlog and auditlog will be skipped.
B<-b> This flag is only used for the DB2 database. The routine will use the DB2 backup utilities to create a binary backup of the entire DB2 database. Note to use this backup, you will have first had to modify the logging of the database and have taken an offline initial backup. Refer to the xCAT DB2 documentation for more instructions.
B<-p> Path to the directory to dump the tables. It will be created, if it does not exist.
@@ -43,10 +51,23 @@ B<dumpxCATdb -p /tmp/db>
B<dumpxCATdb -a -p /tmp/db>
2. To have dumpxCATdb not backup the hosts or passwd table:
3. To have dumpxCATdb not backup the hosts or passwd table:
B<chtab key=skiptables site.value="hosts,passwd">
B<dumpxCATdb -p /tmp/db>
4. To have dumpxCATdb not backup the hosts or passwd table:
B<export XCAT_SKIPTABLES="hosts,passwd">
B<dumpxCATdb -p /tmp/db>
5. To have dumpxCATdb use DB2 utilities to backup the DB2 database:
B<dumpxCATdb -b -p /install/db2backup>
=head1 FILES
/opt/xcat/sbin/dumpxCATdb
+84 -34
View File
@@ -4,38 +4,61 @@ B<genimage> - Generates a stateless image to be used for a diskless install.
=head1 SYNOPSIS
B<genimage> B<-o> I<OS> B<-p> I<profile> [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-l> I<rootlimit>] [B<-r> I<additional_nics>] [B<-k> I<kernel_version>] [B<-g> I<krpm_version>] [B<-m> statelite] [B<--permission> I<permission>]
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<-t> I<tmplimitsize>] [B<--permission> I<permission>]
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<-t> I<tmplimitsize>] [B<--permission> I<permission>] I<imagename>
B<genimage> [B<-o> I<OS>] [B<-l> I<rootlimit>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<-r> I<additional_nics>] [B<-k> I<kernel_version>] [B<-g> I<krpm_version>] [B<-m> statelite] imagename
B<genimage> [B<-h> | B<--help> | B<-v> | B<--version>]
=head1 DESCRIPTION
Generates a stateless image that can be used to boot xCAT nodes in a diskless mode.
Generates a stateless and a statelite image that can be used to boot xCAT nodes in a diskless mode.
If I<imagename> is not specified, the default packages included
(and excluded) in the image are specified by /opt/xcat/share/xcat/netboot/<OS>/<profile>.<OS>.<arch>.pkglist and
/opt/xcat/share/xcat/netboot/<OS>/<profile>.exlist.
Additional packages that are not from the os distro can be specified in a <profile><OS>.<arch>.otherpkgs.pkglist file.
Customized package list files can be specified under /install/custom/netboot/<OS> directory. The generated image will be put in /install/netboot/<OS>/<arch>/<profile>.
(and excluded) in the image are specified by
If I<imagename> is specified, the package list files are specified in the I<osimage> table and I<linuximage> table.
If B<genimage> runs on the Management node, both the I<osimage> table and I<linuximage> table will be updated following the B<genimage> options. And, if there is no I<imagename> called <OS>-<arch>-netboot-<profile> or <OS>-<arch>-statelite-<profile>, the B<genimage> command will create them into I<linuximage> and I<osimage> tables.
/opt/xcat/share/xcat/netboot/<os>/<profile>[.<osver>][.<arch>].pkglist and
/opt/xcat/share/xcat/netboot/<os>/<profile>[.<osver>][.<arch>].exlist.
Additional packages that are not from the os distro can be specified in a
/opt/xcat/share/xcat/netboot/<os>/<profile>[.<osver>][.<arch>].otherpkgs.pkglist file.
Customized package list files can be specified under /install/custom/netboot/<os> directory. The generated image will be put in /install/netboot/<osver>/<arch>/<profile> directory.
The newly generated image names will have the following format:
for stateless: <osver>-<arch>-netboot-<profile>
for statelite: <osver>-<arch>-statelite-<profile>
B<genimage> command will create them into I<linuximage> and I<osimage> tables.
If I<imagename> is specified, the package list file names are read from the I<osimage> table and I<linuximage> tables.
If B<genimage> runs on the management node, both the I<osimage> table and I<linuximage> table will be updated with the given values from the options.
The B<genimage> command will generate two initial ramdisks for B<stateless> and B<statelite>, one is B<initrd-stateless.gz>, the other one is B<initrd-statelite.gz>.
After your image is created, you can chroot to the
image, install any additional software you would like, or make modifications to files, and then run the following command to prepare the image for deployment.
for stateless: B<packimage>
for statelite: B<liteimg>
Becides prompting for the input for some flags, the B<genimage> command can not be used in interactive mode. If any of the rpms or other scripts prompt, such as to accept a license agreement, you must use the genimage script specific to your OS from the /opt/xcat/share/xcat/netboot/<os> directory.
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
/opt/xcat/share/xcat/netboot/<OS> to a system that is the proper architecture, and mount /install from
the management node to that system.
/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.
The B<genimage> command will run geninitrd automatically. (You can run geninitrd yourself at a later time, if
you want to rebuild the initrd.) After your image is created, you can chroot to the
image, install any additional software you would like, or make modifications to files, and then run
B<packimage> to prepare the image for deployment.
The B<genimage> and B<geninitrd> commands will generate two initial ramdisks for B<statelite> and B<stateless>, one is B<initrd-statelite.gz>, the other one is B<initrd-stateless.gz>.
The B<genimage> command can not be used in interactive mode. If any of the rpms or other scripts prompt, such as to accept a license agreement, you must use the genimage script specific to your OS from the /opt/xcat/share/xcat/netboot/<os> directory.
=head1 Parameters
@@ -46,25 +69,25 @@ I<imagename> specifies the name of a os image definition to be used. The specifi
=over 12
=item B<-o> I<OS>
=item B<-a> I<arch>
The hardware architecture of this node: x86_64, ppc64, x86, ia64, etc. If omitted, the current hardware architecture will be used.
=item B<-o> I<osver>
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>).
/install/<osver>/<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,
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<--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.
=item B<-n> I<nodenetdrivers>
This argument is now optional, and allows you to specify the driver
@@ -81,16 +104,20 @@ 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<-r> I<additional_nics>
=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.
=item B<-r> I<otherifaces>
Other network interfaces (e.g. eth1) in the image that should be configured via DHCP.
=item B<-k> I<kernel_version>
=item B<-k> I<kernelver>
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<-g> I<krpm_version>
=item B<-g> I<krpmver>
This flag is for SLES only. Use this flag to specify the rpm version for kernel packages in the image. It must be present if -k flag is specified in the command for SLES.
@@ -121,16 +148,39 @@ Display usage message.
=over 3
=item 1.
=item 1
To prompt the user for inputs:
For example, to generate a fedora8 image for a compute node architecture
genimage
=item 2
To generate a fedora8 image for a compute node architecture
x86_64 and place it in the
/install/netboot/fedora8/x86_64/compute/rootimg directory:
cd /opt/xcat/share/xcat/netboot/fedora/
genimage -i eth0 -o fedora8 -p compute
genimage -i eth0 -o fedora8 -p compute
=item 3
genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute
=item 4
genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute
=item 5
genimage -i eth0 -n igb,e1000e,e1000,bnx2,tg3 -o centos5.4 -p nfsroot --permission 777
=item 6
genimage -i eth0 -n tg3 myimagename
=item 7
genimage myimagename
This would use the profile information from the /opt/xcat/share/xcat/netboot/fedora/compute* files.
=back
@@ -144,4 +194,4 @@ This would use the profile information from the /opt/xcat/share/xcat/netboot/fed
=head1 SEE ALSO
L<geninitrd(1)|geninitrd.1>, L<packimage(1)|packimage.1>
L<geninitrd(1)|geninitrd.1>, L<packimage(1)|packimage.1>, L<liteimg(1)|liteimg.1>
+7 -4
View File
@@ -57,8 +57,11 @@ To display connection status for all CEC nodes in node group CEC:
Output is similar to:
cec1: ipaddr=192.168.200.245,alt_ipaddr=unavailable,state=Connected
cec2: Connection not found
cec1: sp=primary,ipadd=40.17.1.1,alt_ipadd=41.17.1.1,state=LINE UP
cec1: sp=secondary,ipadd=40.17.1.2,alt_ipadd=41.17.1.2,state=LINE UP
cec2: sp=primary,ipadd=40.17.2.1,alt_ipadd=41.17.2.1,state=LINE UP
cec2: 40.17.2.2: No connection information found for hardware control point "40.17.2.2", please create the connection for this hardware control point firstly.
cec2: 41.17.2.2: No connection information found for hardware control point "41.17.2.2", please create the connection for this hardware control point firstly.
=item 2.
@@ -68,8 +71,8 @@ To display connection status for Frame node frame1:
Output is similar to:
frame1: side=a,ipaddr=192.168.200.247,alt_ipaddr=unavailable,state=Connected
frame1: side=b,ipaddr=192.168.200.248,alt_ipaddr=unavailable,state=Connected
frame1: sp=primary,ipadd=192.168.200.1,alt_ipadd=192.168.201.1,state=LINE UP
frame1: sp=secondary,ipadd=192.168.200.2,alt_ipadd=192.168.201.2,state=LINE UP
=item 3.
+1 -1
View File
@@ -51,7 +51,7 @@ B<-m> Multicast mode (defaults to broadcast).
B<--makedhcp> Issue xCAT command makedhcp internally.
B<-M> Matching mode, match the pre-defined node names from vpd table or switch table.
Default is using factory name if no -M specified.
Matching vpd table is the default setting whether the flag is specified. And matching switch table is not yet supported.
B<-n> Only display and write the newly discovered hardwares.
+62 -22
View File
@@ -1,6 +1,6 @@
=head1 NAME
B<lsvm> - Lists partition profile information for HMC- and IVM-managed nodes. For Power 775, it lists the LPARs' I/O slots information and CEC configuration.
B<lsvm> - Lists partition profile information for HMC-, KVM-, Vmware- and IVM-managed nodes. For Power 775, it lists the LPARs' I/O slots information and CEC configuration.
=head1 SYNOPSIS
@@ -18,11 +18,29 @@ B<lsvm> [B<-l>| B<--long>] I<noderange>
=head1 DESCRIPTION
The lsvm command lists all partition profiles defined for the partitions specified in noderange. If noderange is a CEC, all the partitions associated with that CEC are displayed.
The lsvm command lists all partition profiles defined for the partitions specified in noderange. If noderange is a CEC, all the partitions associated with that CEC are displayed.
=head2 For PPC (using Direct FSP Management):
For Power 775, lsvm lists all partition I/O slots information for the partitions specified in noderange. If noderange is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information
For Power 775, lsvm lists all partition I/O slots information for the partitions specified in noderange. If noderange is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
The pump mode value has the valid options:
1 - Node Pump Mode
2 - Chip Pump Mode
The Memory Interleaving Mode has 3 valid options:
0 - not Applicable
1 - interleaved
2 - non-interleaved
More information about this part, refer to the section Using the *vm commands to define partitions in xCAT DFM in the link below.
https://sourceforge.net/apps/mediawiki/xcat/index.php?title=XCAT_Power_775_Hardware_Management
=head2 For KVM and Vmware
The virtual machines that defined in the hypervisor I<noderange> will be displayed. I<noderange> only can be hypervisor. The type of the hypervisor should be set: hypervisor.type before running the lsvm.
Note: Only the virtual machine which is in power on state can be listed by lsvm command.
=head1 OPTIONS
@@ -115,7 +133,15 @@ Output is similar to:
5: 520/U78A9.001.0123456-P1-C14/0x21010208/2/5
9: 529/U78A9.001.0123456-P1-C11/0x21010211/2/9
9: 528/U78A9.001.0123456-P1-C12/0x21010210/2/9
cec1: PendingPumpMode=1,CurrentPumpMode=1,OctantCount=8:OctantID=0,PendingOctCfg=5,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=1,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=2,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=3,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=4,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=5,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
cec1: PendingPumpMode=1,CurrentPumpMode=1,OctantCount=8:
OctantID=0,PendingOctCfg=5,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=1,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=2,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=3,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=4,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=5,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
To list the lparname of lpars, enter:
@@ -123,24 +149,38 @@ To list the lparname of lpars, enter:
Output is similar to:
lpar1: 1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1
lpar1: 1: 513/U78A9.001.0123456-P1-C15/0x21010201/2/1
lpar1: 1: 512/U78A9.001.0123456-P1-C16/0x21010200/2/1
lpar13: 13: 537/U78A9.001.0123456-P1-C9/0x21010219/2/13
lpar13: 13: 536/U78A9.001.0123456-P1-C10/0x21010218/2/13
lpar17: 17: 545/U78A9.001.0123456-P1-C7/0x21010221/2/17
lpar17: 17: 544/U78A9.001.0123456-P1-C8/0x21010220/2/17
lpar21: 21: 553/U78A9.001.0123456-P1-C5/0x21010229/2/21
lpar21: 21: 552/U78A9.001.0123456-P1-C6/0x21010228/2/21
lpar24: 25: 569/U78A9.001.0123456-P1-C1/0x21010239/2/25
lpar25: 25: 561/U78A9.001.0123456-P1-C3/0x21010231/2/25
lpar25: 25: 560/U78A9.001.0123456-P1-C4/0x21010230/2/25
lpar29: 29: 568/U78A9.001.0123456-P1-C2/0x21010238/2/29
lpar5: 5: 521/U78A9.001.0123456-P1-C13/0x21010209/2/5
lpar5: 5: 520/U78A9.001.0123456-P1-C14/0x21010208/2/5
lpar9: 9: 529/U78A9.001.0123456-P1-C11/0x21010211/2/9
lpar9: 9: 528/U78A9.001.0123456-P1-C12/0x21010210/2/9
cec1: PendingPumpMode=1,CurrentPumpMode=1,OctantCount=8:OctantID=0,PendingOctCfg=5,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=1,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=2,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=3,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=4,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=5,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
lpar1: 1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1: 32: 0/3/3
lpar1: 1: 513/U78A9.001.0123456-P1-C15/0x21010201/2/1: 32: 0/3/3
lpar1: 1: 512/U78A9.001.0123456-P1-C16/0x21010200/2/1: 32: 0/3/3
lpar13: 13: 537/U78A9.001.0123456-P1-C9/0x21010219/2/13: 32: 0/3/3
lpar13: 13: 536/U78A9.001.0123456-P1-C10/0x21010218/2/13: 32: 0/3/3
lpar17: 17: 545/U78A9.001.0123456-P1-C7/0x21010221/2/17: 32: 0/0/0
lpar17: 17: 544/U78A9.001.0123456-P1-C8/0x21010220/2/17: 32: 0/0/0
lpar21: 21: 553/U78A9.001.0123456-P1-C5/0x21010229/2/21: 32: 0/0/0
lpar21: 21: 552/U78A9.001.0123456-P1-C6/0x21010228/2/21: 32: 0/0/0
lpar24: 25: 569/U78A9.001.0123456-P1-C1/0x21010239/2/25: 32: 0/0/0
lpar25: 25: 561/U78A9.001.0123456-P1-C3/0x21010231/2/25: 32: 0/0/0
lpar25: 25: 560/U78A9.001.0123456-P1-C4/0x21010230/2/25: 32: 0/0/0
lpar29: 29: 568/U78A9.001.0123456-P1-C2/0x21010238/2/29: 32: 0/0/0
lpar5: 5: 521/U78A9.001.0123456-P1-C13/0x21010209/2/5: 32: 0/3/3
lpar5: 5: 520/U78A9.001.0123456-P1-C14/0x21010208/2/5: 32: 0/3/3
lpar9: 9: 529/U78A9.001.0123456-P1-C11/0x21010211/2/9: 32: 0/3/3
lpar9: 9: 528/U78A9.001.0123456-P1-C12/0x21010210/2/9: 32: 0/3/3
cec1: PendingPumpMode=1,CurrentPumpMode=1,OctantCount=8:
OctantID=0,PendingOctCfg=5,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=1,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=2,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=3,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=4,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=5,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;
Number of BSR arrays: 256,Bytes per BSR array: 4096,Available BSR array: 0;
Available huge page memory(in pages): 0
Configurable huge page memory(in pages): 12
Page Size(in GB): 16
Maximum huge page memory(in pages): 24
Requested huge page memory(in pages): 15
=head1 FILES
+7 -1
View File
@@ -88,7 +88,7 @@ Indicates that the file being piped to the command is in stanza format. See the
To create a site definition.
mkdef -t site -o clustersite rsh=/bin/rsh rcp=/bin/rcp installdir=/xcatinstall
mkdef -t site -o clustersite installdir=/xcatinstall
=item 2.
@@ -140,6 +140,12 @@ To create a dynamic node group definition called SLESNodes containing all the SL
mkdef -t group -o SLESNodes -d -w "os=~^sles[0-9]+$"
=item 10.
To create a entry (7.0) in the policy table for user admin1
mkdef -t policy -o 7.0 name=admin1 rule=allow
=back
+2 -2
View File
@@ -41,7 +41,7 @@ Note: If a CEC belongs to a frame, which has a BPA installed, this CEC should no
For PPC (using Direct FSP Management) specific:
It is used to set up connections for CEC and Frame node to Hardware Server on management node (or service node ). It only could be done according to the node definition in xCAT DB. And this command will try to read the user/password from the ppcdirect table firstly. If fails, then read them from passwd table. Commonly , the username is B<HMC>. If using the B<ppcdirect> table, each CEC/Frame and user/password should be stored in B<ppcdirect> table. If using the B<passwd> table, the key should be "B<cec>" or "B<frame>", and the related user/password are stored in B<passwd> table.
It is used to set up connections for CEC and Frame node to Hardware Server on management node (or service node ). It only could be done according to the node definition in xCAT DB. And this command will try to read the user/password from the ppcdirect table first. If fails, then read them from passwd table. Commonly , the username is B<HMC>. If using the B<ppcdirect> table, each CEC/Frame and user/password should be stored in B<ppcdirect> table. If using the B<passwd> table, the key should be "B<cec>" or "B<frame>", and the related user/password are stored in B<passwd> table.
When B<--port> is specified, this command will create the connections for CECs/Frames whose side in B<vpd> table is equal to port value.
@@ -72,7 +72,7 @@ The tooltype is used to communicate to the CEC/Frame. The value could be B<lpar>
=item B<--port>
The port value specify which side will be used to create the connection to the CEC/Frame. The value could be "B<0>" or "B<1>". If this port value is not specfied in the command, it will use the default value "B<0>". If the port value is "B<0>", in the vpd table, the side column should be B<A-0> and B<B-0>; If the port value is "B<1>", the side column should be B<A-1> and B<B-1>. When making hardware connection between CEC/Frame and HMC, the port is used to specify the fsp/bpa port of the cec/frame.
The port value specifies which special side will be used to create the connection to the CEC/Frame. The value could only be specified as "B<0>" or "B<1>" and the default value is "B<0,1>". If the user wants to use all ports to create the connection, he should not specify this value. If the port value is specified as "B<0>", in the vpd table, the side column should be B<A-0> and B<B-0>; If the port value is specified as "B<1>", the side column should be B<A-1> and B<B-1>. When making hardware connection between CEC/Frame and HMC, the value is used to specify the fsp/bpa port of the cec/frame and will be organized in order of "B<A-0,A-1,B-0,B-1>". If any side does not exist, the side would simply be ignored. Generally, only one port of a fsp/bap can be connected while another port be used as backup.
=item B<-s>
+7 -8
View File
@@ -109,7 +109,7 @@ The name of a NIM mksysb resource.
=item B<otherpkgs>
One or more comma separated installp or rpm packages. The rpm packages must have a prefix of 'R:', (ex. R:foo.rpm)
One or more comma separated installp, emgr, or rpm packages. The packages must have prefixes of 'I:', 'E:', or 'R:', respectively. (ex. R:foo.rpm)
=item B<paging>
@@ -153,7 +153,10 @@ The alternate flags to be passed along to the AIX installp command. (The default
=item B<rpm_flags>
The alternate flags to be passed along to the AIX rpm command. (The default for rpm_flags is "-Uvh --replacepkgs".)
The alternate flags to be passed along to the AIX rpm command. (The default for
rpm_flags is "-Uvh ".) The mknimimage command will check each rpm to see if
it is installed. It will not be reinstalled unless you specify the appropriate
rpm option, such as '--replacepkgs'.
=item B<emgr_flags>
@@ -167,10 +170,6 @@ The maximum size for a single dump image the dump resource will accept. Space is
The maximum number of archived dumps for an individual client. The default is one.
=item B<notify>
An administrator supplied script that will be invoked when a new dump is captured, or when a dump error occurs on the client.
=item B<snapcollect>
Indicates that after a dump is collected then snap data should be collected. The snap data will be collected in the clients dump resource directory. Values are "yes" or "no". The default is "no".
@@ -185,7 +184,7 @@ Value Specifies the security method required for NFS access.
=back
Note that you may specify multiple "script", "otherpkgs", and "installp_bundle" resources by using a comma seperated list. (ex. "script=ascript,bscript"). RPM names may be included in the "otherpkgs" list by using a "R:" prefix(ex. "R:whatever.rpm"). epkg (AIX interim fix package) file names may be included in the "otherpkgs" too(ex. "otherpkgs=IZ38930TL0.120304.epkg.Z").
Note that you may specify multiple "script", "otherpkgs", and "installp_bundle" resources by using a comma seperated list. (ex. "script=ascript,bscript"). RPM names may be included in the "otherpkgs" list by using a "R:" prefix(ex. "R:whatever.rpm"). epkg (AIX interim fix package) file names may be included in the "otherpkgs" using the 'E:' prefix. (ex. "otherpkgs=E:IZ38930TL0.120304.epkg.Z").
=item B<-b mksysbfile>
@@ -317,7 +316,7 @@ B<mknimimage -t diskless -s 61cosi_lpp_source 611cosi tmp=mytmp home=myhome>
10) Create a diskless image and update it with additional software using rpm flags and configuration files.
B<mknimimage -t diskless -s 61cosi_lpp_source 61dskls otherpkgs=fset1,R:foo.rpm,IZ38930TL0.120304.epkg.Z synclists=/install/mysyncfile rpm_flags="-i --nodeps">
B<mknimimage -t diskless -s 61cosi_lpp_source 61dskls otherpkgs=I:fset1,R:foo.rpm,E:IZ38930TL0.120304.epkg.Z synclists=/install/mysyncfile rpm_flags="-i --nodeps">
The xCAT osimage definition created by this command will include the "otherpkgs" and "synclists" values. The NIM SPOT resource associated with this osimage will be updated with the additional software using rpm flags "-i --nodeps" and configuration files.
+32 -5
View File
@@ -20,7 +20,11 @@ B<mkvm> [B<-V>| B<--verbose>] I<noderange> B<--full>
=head2 For KVM:
B<mkvm> I<noderange> B<-m>|B<--master> I<mastername> B<-s>|B<--size> I<disksize> B<-f>|B<--force>
B<mkvm> I<noderange> [B<-m|--master> I<mastername>] [B<-s|--size> I<disksize>] [B<--mem> I<memsize>] [B<--cpus> I<cpucount>] [B<-f|--force>]
=head2 For Vmware:
B<mkvm> I<noderange> [B<-s>|B<--size> I<disksize>] [B<--mem> I<memsize>] [B<--cpus> I<cpucount>]
=head1 DESCRIPTION
@@ -36,9 +40,12 @@ Please make sure the nodes in the I<noderange> is defined in the I<nodelist> tab
Please note that the mkvm command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server.
=head2 For KVM:
=head2 For KVM and Vmware:
The mkvm command creates new virtual machine(s) with the I<disksize> size of hard disk, I<memsize> size of memory and I<cpucount> number of cpu.
For KVM: If B<-f>|B<--force> is specified, the storage will be destroyed first if it existed.
mkvm ....
=head1 OPTIONS
@@ -52,6 +59,18 @@ Display usage message.
The cec (fsp) name for the destination.
=item B<--cpus>
The cpu count which will be created for the kvm/vmware virtual machine.
=item B<--full>
Request to create a new full system partition for each CEC.
=item B<-f|--force>
If B<-f|--force> is specified, the storage will be destroyed first if it existed.
=item B<-i>
Starting numeric id of the newly created partitions.
@@ -60,13 +79,17 @@ Starting numeric id of the newly created partitions.
The partition name of the source.
=item B<--mem>
The memory size which will be used for the new created kvm/vmware virtual machine. Unit is Megabyte.
=item B<-p>
The file that contains the profiles for the source partitions.
=item B<--full>
=item B<-s|--size>
Request to create a new full system partition for each CEC.
The size of storage which will be created for the kvm/vmware virtual machine.
=item B<-v|--version>
@@ -146,6 +169,10 @@ Output is similar to:
lpar5: Success
lpar6: Success
5. To create a new kvm/vmware virtual machine with 10G storage, 2048M memory and 2 cpus.
mkvm vm1 -s 10G --mem 2048 --cpus 2
=head1 FILES
/opt/xcat/bin/mkvm
+3 -3
View File
@@ -1,7 +1,7 @@
=head1 NAME
B<rbootseq> - Persistently sets the order of boot devices for BladeCenter blades or PPC LPARs.
B<rbootseq> - Persistently sets the order of boot devices for BladeCenter blades or PPC LPARs using Direct FSP Management (DFM).
=head1 SYNOPSIS
@@ -17,7 +17,7 @@ B<rbootseq> I<noderange> B<[hfi|net]>
=head1 DESCRIPTION
For PPC (with HMC) specific:
For Blade specific:
B<rbootseq> sets the boot sequence (the order in which boot devices should be tried) for the specified blades.
Up to four different medium/devices can be listed, separated by commas. The boot sequence will remain
@@ -25,7 +25,7 @@ in effect for these blades until set differently.
For PPC (using Direct FSP Management) specific:
B<rbootseq> sets the net or hfi device as the first boot device for the specified PPC LPARs. The net or hfi mac address is store in the mac table. And B<rbootseq> requires that the network information is correct in networks table as for getmacs/rnetboot.
B<rbootseq> sets the net or hfi device as the first boot device for the specified PPC LPARs. The net or hfi mac address is stored in the mac table. And B<rbootseq> requires that the network information is correct in networks table as for getmacs/rnetboot.
=head1 OPTIONS
+4 -4
View File
@@ -185,12 +185,12 @@ will get response immediately.
=head1 B<PREREQUISITES>
For the system p nodes, the B<renergy> command depends
on the Energy Management Plugin B<xCAT-energy> to
communicate with server. B<xCAT-energy> can be downloaded from the IBM web site:
http://www14.software.ibm.com/webapp/set2/sas/f/xcat/energy.html
on the Energy Management Plugin B<xCAT-pEnergy> to
communicate with server. B<xCAT-pEnergy> can be downloaded from the IBM web site:
http://www.ibm.com/support/fixcentral/. (Other Software -> EM)
For iDataPlex nodes, the B<renergy> command depends
on the Energy Management Plugin B<perl-IBM-EnergyManager> to
on the Energy Management Plugin B<xCAT-xEnergy> to
communicate with server. This plugin must be requested from IBM.
(The support for BladeCenter energy management is built into base xCAT,
+21 -7
View File
@@ -6,12 +6,19 @@ B<restorexCATdb> - restores the xCAT db tables .
B<restorexCATdb> [B<-a>] [B<-V>] [{B<-p>|B<--path>} I<path>]
B<restorexCATdb> [B<-b>] [B<-V>] [{B<-t>|B<--timestamp>} I<timestamp>] [{B<-p>|B<--path>} I<path>]
B<restorexCATdb> [B<-h>|B<--help>] [B<-v>|B<--version>]
=head1 DESCRIPTION
The restorexCATdb command restores the xCAT database tables from the directory given by the -p flag. The site table skiptables attribute can be set to a list of tables not to restore. See man dumpxCATdb.
If not using binary restore(-b), the restorexCATdb command restores the xCAT database tables from the *.csv files in directory given by the -p flag. The site table skiptables attribute can be set to a list of tables not to restore. It will not restore isnm_perf* tables. See man dumpxCATdb.
If using the binary restore option for DB2, the entire database is restored from the binary backup made with dumpxCATdb. The database will be restored using DB2 Utilities. The timestamp of the correct DB2 backup file (-t) must be provided.
All applications accessing the DB2 database must be stopped before you can use the binary restore options. See the xCAT DB2 document for more information.
=head1 OPTIONS
@@ -23,10 +30,13 @@ B<-v> Command Version.
B<-V> Verbose.
B<-a> All,without this flag the eventlog and auditlog will be skipped.
These tables are skipped by default because restoring will generate new indexes.
These tables are skipped by default because restoring will generate new indexes
B<-b> Restore from the binary image.
B<-p> Path to the directory containing the database restore files.
B<-t> Use with the -b flag to designate the timestamp of the binary image to use to restore.
=head1 RETURN VALUE
@@ -36,13 +46,17 @@ B<-p> Path to the directory containing the database restore files.
=head1 EXAMPLES
1. To restore the xCAT database from the /tmp/db directory, enter:
1. To restore the xCAT database from the /dbbackup/db directory, enter:
B<restorexCATdb -p /tmp/db>
B<restorexCATdb -p /dbbackup/db>
2. To restore the xCAT database including auditlog and eventlog from the /tmp/db directory, enter:
2. To restore the xCAT database including auditlog and eventlog from the /dbbackup/db directory, enter:
B<restorexCATdb -a -p /tmp/db>
B<restorexCATdb -a -p /dbbackup/db>
3. To restore the xCAT database from the binary image with timestamp 20111130130239 enter:
B<restorexCATdb -b -t 20111130130239 -p /dbbackup/db>
=head1 FILES
+19 -2
View File
@@ -14,7 +14,7 @@ B<rflash> I<noderange> [B<--commit>|B<--recover>] [B<-V>|B<--verbose>]
=head2 PPC (without HMC, using Direct FSP Management) specific:
B<rflash> I<noderange> B<-p> I<directory> B<--activate> B<disruptive>
B<rflash> I<noderange> B<-p> I<directory> B<--activate> B<disruptive> [B<-d> I<data_directory>]
B<rflash> I<noderange> [B<--commit>|B<--recover>]
@@ -54,6 +54,19 @@ If it outputs B<"Timeout waiting for prompt"> during the upgrade, please set the
In currently Direct FSP/BPA Management, our B<rflash> doesn't support B<concurrent> value of B<--activate> flag, and only support B<disruptive>. The B<disruptive> option will cause any affected systems that are powered on to be powered down before installing and activating the update. So we require that the systems should be powered off before do the firmware update.
In Direct FSP/BPA Management, there is -d <data_directory> option. The default value is /tmp. When do firmware update, rflash will put some related data from rpm packages in <data_directory> directory, so the execution of rflash will require available disk space in <data_directory> for the command to properly execute:
(1) For one CEC/Frame, if the rpm package size is rpmsize, it requires that the available disk space should be more than:
3 * rpmsize
(2) For 12 CECs and 1 Frame in a building block, the rpm packages of the CECs are the same one, it require that the available disk space should be more than:
3 * rpmsize + 11 * 1.5 * rpmsize = 19.5 * rpmsize
(3)For n CECs/Frames, all the rpm packages are different, it require that the available disk space should be more than:
3 * rpmsize * n
(4)For 2 building block, each building block including 12 CECs and 1 Frame, and the rpm packages of the CECs in two building block are the same one. it require that the available disk space should be more than:
3 * rpmsize + 11 * 1.5 * rpmsize + 12 * 1.5 * rpmsize = 37.5 * rpmsize
(5) For 2 building block, each building block including 12 CECs and 1 Frame, and the rpm packages of the CECs in the same building block are the same one, but in different building block are different. it require that the available disk space should be more than:
(3 * rpmsize + 11 * 1.5 * rpmsize) * 2 = 39 * rpmsize
For Power 775, the rflash command takes effect on the primary and secondary FSPs or BPAs almost in parallel.
=head1 B<Options>
@@ -68,9 +81,13 @@ Writes the commands usage statement to standard output.
Specifies the directory where the packages are located.
=item B<-d data_directory>
Specifies the directory where the raw data from rpm packages for each CEC/Frame are located. The default directory is /tmp. The option is only used in Direct FSP/BPA Management.
=item B<--activate> B<concurrent> | B<disruptive>
Must be specified to activate the new Licensed Internal Code. The disruptive option will cause the target systems to be recycled. Without this flag, LIC updates will be installed only, not activated.
Must be specified to activate the new Licensed Internal Code. The "disruptive" option will cause the target systems to be recycled. Without this flag, LIC updates will be installed only, not activated.
=item B<--commit>
+23 -2
View File
@@ -16,7 +16,9 @@ B<rinv> I<noderange> {B<bus>|B<config>|B<serial>|B<model>|B<firm>|B<all>}
=head2 PPC (using Direct FSP Management) specific:
B<rinv> I<noderange> {B<firm>|B<deconfig>}
B<rinv> I<noderange> {B<firm>}
B<rinv> I<noderange> {B<deconfig> [B<-x>]}
=head2 Blade specific:
@@ -64,7 +66,11 @@ Retrieves firmware versions.
=item B<deconfig>
Retrieves deconfigured resources. Deconfigured resources are hw components (cpus, memory, etc.) that have failed so the firmware has automatically turned those components off.
Retrieves deconfigured resources. Deconfigured resources are hw components (cpus, memory, etc.) that have failed so the firmware has automatically turned those components off. This option is only capable of listing some of the deconfigured resources and should not be the only method used to check the hardware status.
=item B<-x>
To output the information of deconfigured resources in XML format.
=item B<asset>
@@ -141,6 +147,21 @@ To retrieve all information available from blade node4, enter:
=item *
To output the information of deconfigured resources in XML format for CEC cec01, enter:
rinv cec01 deconfig -x
cec01:
<SYSTEM>
<System_type>IH</System_type>
<NODE>
<Location_code>U78A9.001.0123456-P1</Location_code>
<RID>800</RID>
</NODE>
</SYSTEM>
=item *
To retrieve 'config' information from the HMC-managed LPAR node3, enter:
rinv node3 config
+8
View File
@@ -16,6 +16,10 @@ B<rmhwconn> [B<-V>| B<--verbose>] I<noderange>
B<rmhwconn> I<noderange> B<-T> I<tooltype>
=head2 PPC (use HMC as SFP) specific:
B<rmhwconn> B<-s>
=head1 DESCRIPTION
For PPC (with HMC) specific:
@@ -28,6 +32,10 @@ For PPC (without HMC, using FSPAPI) specific:
It's used to disconnection CEC and Frame nodes from hardware server.
For PPC (use HMC as SFP) specific:
It is used to disconnect Frame nodes from HMC nodes.
=head1 OPTIONS
=over 5
+3 -1
View File
@@ -1,6 +1,6 @@
=head1 NAME
B<rmvm> - Removes HMC- and IVM-managed partitions.
B<rmvm> - Removes HMC-, KVM-, Vmware- and IVM-managed partitions.
=head1 SYNOPSIS
@@ -11,6 +11,8 @@ I<rmvm [-v| --version]>
I<rmvm [-V| --verbose] noderange [-r] [--service]>
=head2 For KVM and Vmware:
I<rmvm [-p] [-f]>
=head1 DESCRIPTION
+119 -1
View File
@@ -138,6 +138,18 @@ B<rspconfig> I<noderange> {B<cec_off_policy>}
B<rspconfig> I<noderange> B<cec_off_policy>={B<poweroff>|B<stayon>}
B<rspconfig> I<noderange> {B<BSR>}
B<rspconfig> I<noderange> {B<huge_page>}
B<rspconfig> I<noderange> B<huge_page>={B<NUM>}
B<rspconfig> I<noderange> {B<setup_failover>}
B<rspconfig> I<noderange> B<setup_failover>={B<enable>|B<disable>}
B<rspconfig> I<noderange> {B<force_failover>}
B<rspconfig> I<noderange> B<--resetnet>
=head2 BPA/Frame (using Direct FSP Management) Specific:
@@ -246,7 +258,23 @@ The gateway ip address.
=item B<hostname>
Display the CEC/BPA system names
Display the CEC/BPA system names.
=item B<BSR>
Get Barrier Synchronization Register (BSR) allocation for a CEC.
=item B<huge_page>
Query huge page information or request NUM of huge pages for CEC. If no value specified, it means query huge page information for the specified CECs, if a CEC is specified, the specified huge_page value NUM will be used as the requested number of huge pages for the CEC, if CECs are specified, it means to request the same NUM huge pages for all the specified CECs.
=item B<setup_failover>={I<enable>|I<disable>}
Enable or disable the service processor failover function of a CEC or display status of this function.
=item B<force_failover>
Force a service processor failover from the primary service processor to the secondary service processor.
=item B<hostname>={I<*|name>}
@@ -587,6 +615,96 @@ B<rspconfig> I<cec01 pending_power_on_side>
cec01: Pending Power On Side Primary: perm
cec01: Pending Power On Side Secondary: perm
=item *
To show the BSR allocation for cec01:
B<rspconfig> I<cec01 BSR>
cec01: Barrier Synchronization Register (BSR)
cec01: Number of BSR arrays: 256
cec01: Bytes per BSR array : 4096
cec01: Available BSR array : 0
cec01: Partition name: BSR arrays
cec01: lpar01 : 32
cec01: lpar02 : 32
cec01: lpar03 : 32
cec01: lpar04 : 32
cec01: lpar05 : 32
cec01: lpar06 : 32
cec01: lpar07 : 32
cec01: lpar08 : 32
=item *
To query the huge page information for CEC1, enter:
B<rspconfig> I<CEC1 huge_page>
CEC1: Huge Page Memory
CEC1: Available huge page memory(in pages): 0
CEC1: Configurable huge page memory(in pages): 12
CEC1: Page Size (in GB): 16
CEC1: Maximum huge page memory(in pages): 24
CEC1: Requested huge page memory(in pages): 15
CEC1: Partition name: Huge pages
CEC1: lpar1 : 3
CEC1: lpar5 : 3
CEC1: lpar9 : 3
CEC1: lpar13 : 3
CEC1: lpar17 : 0
CEC1: lpar21 : 0
CEC1: lpar25 : 0
CEC1: lpar29 : 0
=item *
To request 10 huge pages for CEC1, enter:
B<rspconfig> I<CEC1 huge_page=10>
CEC1: Success
=item *
To disable service processor failover for cec01, in order to complete this command, the user should power off cec01 first:
B<rspconfig> I<cec01 setup_failover>
cec01: Failover status: Enabled
B<rpower> I<cec01 off>
B<rspconfig> I<cec01 setup_failover=disable>
cec01: Success
B<rspconfig> I<cec01 setup_failover>
cec01: Failover status: Disabled
=item *
To force service processor failover for cec01:
B<lshwconn> I<cec01>
cec01: 192.168.1.1: LINE DOWN
cec01: 192.168.2.1: sp=primary,ipadd=192.168.2.1,alt_ipadd=unavailable,state=LINE UP
cec01: 192.168.1.2: sp=secondary,ipadd=192.168.1.2,alt_ipadd=unavailable,state=LINE UP
cec01: 192.168.2.2: LINE DOWN
B<rspconfig> I<cec01 force_failover>
cec01: Success.
B<lshwconn> I<cec01>
cec01: 192.168.1.1: sp=secondary,ipadd=192.168.1.1,alt_ipadd=unavailable,state=LINE UP
cec01: 192.168.2.1: LINE DOWN
cec01: 192.168.1.2: LINE DOWN
cec01: 192.168.2.2: sp=primary,ipadd=192.168.2.2,alt_ipadd=unavailable,state=LINE UP
=item *
To deconfigure memory bank 9 and 10 of Processing Unit 0 on mm01:
-1
View File
@@ -234,7 +234,6 @@ To execute B<sinv> on noderange, node1-node4, using node1 as
the seed node, to generate the sinv.template from the xdsh command (-c),
using the exact match option, generating no additional templates, enter:
B<sinv> I<-c "xdsh node1-node4 lslpp -l | grep bos.adt" -s node1 -e -p /tmp/sinv.template -o /tmp/sinv.output>
Note: the /tmp/sinv.template file must be empty, otherwise it will be used
+27 -5
View File
@@ -4,11 +4,11 @@ B<snmove> - Change xCAT compute nodes to use a different xCAT service node.
=head1 SYNOPSIS
B<snmove> I<noderange> [B<-d>|B<--dest> I<sn2>] [B<-D>|B<--destn> I<sn2n>] [B<-i>|B<--ignorenodes>] [B<-P>|B<--postscripts> I<script1,script2...>|I<all>]
B<snmove> [B<-h>|B<--help>]
B<snmove> B<-s>|B<--source> I<sn1> [B<-S>|B<--sourcen> I<sn1n>] [B<-d>|B<--dest> I<sn2>] [B<-D>|B<--destn> I<sn2n>] [B<-i>|B<--ignorenodes>] [B<-P>|B<--postscripts> I<script1,script2...>|I<all>]
B<snmove> I<noderange> [B<-V>] [B<-l>|B<--liteonly>] [[B<-d>|B<--dest>] I<sn2> ] [[B<-D>|B<--destn>] I<sn2n>] [B<-i>|B<--ignorenodes>] [[B<-P>|B<--postscripts>] I<script1,script2...>|I<all> ]
B<snmove> [B<-h>|B<--help>|B<-v>|B<--version>]
B<snmove> [B<-V>] [B<-l>|B<--liteonly>] B<-s>|B<--source> I<sn1> [[B<-S>|B<--sourcen>] I<sn1n>] [[B<-d>|B<--dest>] I<sn2>] [[B<-D>|B<--destn>] I<sn2n>] [B<-i>|B<--ignorenodes>] [B<-P>|B<--postscripts> I<script1,script2...>|I<all>]
=head1 DESCRIPTION
@@ -48,9 +48,17 @@ node (tftpserver, monserver, nfsserver, conserver), and if they were set
to the original service node they will be changed to point to the backup
service node.
In some cases, if you are using the xCAT B<AIX> statelite support, the
B<snmove> command will synchronize the persistent statelite directories
from the nodes primary service node to it's backup service node.
This will only be done if the server specified in the B<statelite> table
is the primary service node. You can also use the B<snmove> command to do
only the synchronization by using the B<-l> option. This support
applies to AIX systems only.
If the -i option is specified, the nodes themselves will not be modified.
If the -i option is NOT specified then the nodes will e modified as follows:
If the -i option is NOT specified then the nodes will be modified as follows:
=over 3
@@ -68,6 +76,10 @@ The B<mkresolvconf> script will be run IF it was included in the nodes postscrip
=item 4.
The default gateway will be switched to the backup service node if B<networks.gateway=<xcatmaster>>.
=item 5.
If it is an AIX diskful node then the B<niminit> command will be run so that it will recognize the new service node as it's NIM master.
=back
@@ -103,9 +115,13 @@ Specifies the hostname of the destination service node as known by (facing) the
No modifications will be made on the nodes. If not specified, several xCAT postscripts will be run on the nodes to complete the switch to the new service node.
=item B<-l|--liteonly>
Used to synchronize the xCAT B<AIX> statelite persistent files to the backup service node. This option will only attempt to synchronize statelite files that are served by the primary service node for the compute node. When you use this option the B<snmove> command will not actually move the nodes to the backup service node.
=item B<-P|--postscripts>
Specifies a list of extra postscripts to be run on the nodes after the nodes are moved over to the new serive node. If 'all' is specified, all the postscripts defined in the postscripts table will be run for the nodes. The specified postscripts must be stored under /install/postscripts directory.
Specifies a list of extra postscripts to be run on the nodes after the nodes are moved over to the new service node. If 'all' is specified, all the postscripts defined in the postscripts table will be run for the nodes. The specified postscripts must be stored under /install/postscripts directory.
=item B<-h|--help>
@@ -163,6 +179,12 @@ Move all the nodes in xCAT group "sngroup1" to the SN named "xcatsn2" and do not
B<snmove sngroup1 -d xcatsn2 -i>
=item 8.
Synchronize any B<AIX> statelite files from the primary server for compute03 to the backup server. Do not move the node to the backup server at this time.
B<snmove compute03 -V -l>
=back
=head1 FILES
+38 -27
View File
@@ -156,9 +156,11 @@ To run the "syslog" script for the nodes, type:
updatenode <noderange> -P syslog
To run a list of scripts, type:
To run a list of scripts, type:
updatenode <noderange> -P script1,script2
updatenode <noderange> -P "script1 p1 p2,script2"
where p1 p2 are the parameters for script1.
The flag '-P' can be omitted when only postscripts parameters are
specified.
@@ -250,6 +252,11 @@ formats.
A comma-separated list of script names.
The scripts must be executable and copied
to the /install/postscripts directory.
Each script can take zero or more parameters.
If parameters are spcified, the whole list needs to be quoted by double quotes.
For example:
B<"script1 p1 p2,script2">
=item [B<attr=val> [B<attr=val...>]]
@@ -381,7 +388,7 @@ the synclist files specified in the osimage "synclists" attribute.
=item 2
To perform a software update and file synchronization only on the node
To run postscripts and file synchronization only on the node
"clstrn01":
B<updatenode clstrn01 -F -P>
@@ -398,27 +405,29 @@ Run:
B<updatenode clstrn01 -F>
=item 3
=item 4
To run the postscripts which indicated in the postscripts attribute on
the node "clstrn01":
B<updatenode clstrn01 -P>
=item 4
=item 5
To run the postscripts script1 and script2 on the node "clstrn01":
B<cp script1,script2 /install/postscripts>
B<updatenode clstrn01 -P script1,script2>
B<updatenode clstrn01 -P "script1 p1 p2,script2">
Since flag '-P' can be omitted when only postscripts parameters are specified,
the following command is equivalent:
B<updatenode clstrn01 script1,script2>
B<updatenode clstrn01 "script1 p1 p2,script2">
=item 5
p1 p2 are parameters for script1.
=item 6
To synchronize the files on the node "clstrn01": Prepare the synclist file.
For AIX, set the full path of synclist in the osimage table synclists
@@ -428,7 +437,7 @@ Then:
B<updatenode clstrn01 -F>
=item 6
=item 7
To perform the software update on the Linux node "clstrn01": Copy the extra
rpm into the /install/post/otherpkgs/<os>/<arch>/* and add the rpm names into
@@ -436,7 +445,7 @@ the /install/custom/install/<ostype>/profile.otherpkgs.pkglist . Then:
B<updatenode clstrn01 -S>
=item 7
=item 8
To update the AIX node named "xcatn11" using the "installp_bundle" and/or
"otherpkgs" attribute values stored in the xCAT database. Use the default installp, rpm and emgr flags.
@@ -447,53 +456,55 @@ Note: The xCAT "xcatn11" node definition points to an xCAT osimage definition
which contains the "installp_bundle" and "otherpkgs" attributes as well as
the name of the NIM lpp_source resource.
=item 8
=item 9
To update the AIX node "xcatn11" by installing the "bos.cpr" fileset using
the "-agQXY" installp flags. Also display the output of the installp command.
B<updatenode xcatn11 -V -S otherpkgs="bos.cpr" installp_flags="-agQXY">
B<updatenode xcatn11 -V -S otherpkgs="I:bos.cpr" installp_flags="-agQXY">
=item 9
Note: The 'I:' prefix is optional but recommended for installp packages.
=item 10
To uninstall the "bos.cpr" fileset that was installed in the previous example.
B<updatenode xcatn11 -V -S otherpkgs="bos.cpr" installp_flags="-u">
B<updatenode xcatn11 -V -S otherpkgs="I:bos.cpr" installp_flags="-u">
=item 10
=item 11
To update the AIX nodes "xcatn11" and "xcatn12" with the "gpfs.base" fileset
and the "rsync" rpm using the installp flags "-agQXY" and the rpm flags "-i --nodeps".
B<updatenode xcatn11,xcatn12 -V -S otherpkgs="gpfs.base,R:rsync-2.6.2-1.aix5.1.ppc.rpm" installp_flags="-agQXY" rpm_flags="-i --nodeps">
B<updatenode xcatn11,xcatn12 -V -S otherpkgs="I:gpfs.base,R:rsync-2.6.2-1.aix5.1.ppc.rpm" installp_flags="-agQXY" rpm_flags="-i --nodeps">
Note: Using the "-V" flag with multiple nodes may result in a large amount of output.
=item 11
=item 12
To uninstall the rsync rpm that was installed in the previous example.
B<updatenode xcatn11 -V -S otherpkgs="R:rsync-2.6.2-1" rpm_flags="-e">
=item 12
=item 13
Update the AIX node "node01" using the software specified in the NIM "sslbnd" and "sshbnd" installp_bundle resources and the "-agQXY" installp flags.
B<updatenode node01 -V -S installp_bundle="sslbnd,sshbnd" installp_flags="-agQXY">
=item 13
=item 14
To get a preview of what would happen if you tried to install the "rsct.base" fileset on AIX node "node42". (You must use the "-V" option to get the full output from the installp command.)
B<updatenode node42 -V -S otherpkgs="rsct.base" installp_flags="-apXY">
B<updatenode node42 -V -S otherpkgs="I:rsct.base" installp_flags="-apXY">
=item 14
=item 15
To check what rpm packages are installed on the AIX node "node09". (You must use the "-c" flag so updatenode does not get a list of packages from the database.)
B<updatenode node09 -V -c -S rpm_flags="-qa">
=item 15
=item 16
To install all software updates contained in the /images directory.
@@ -503,25 +514,25 @@ Note: Make sure the directory is exportable and that the permissions are set
correctly for all the files. (Including the .toc file in the case of
installp filesets.)
=item 16
=item 17
Install the interim fix package located in the /efixes directory.
B<updatenode node29 -V -S -d /efixes otherpkgs=IZ38930TL0.120304.epkg.Z>
B<updatenode node29 -V -S -d /efixes otherpkgs=E:IZ38930TL0.120304.epkg.Z>
=item 17
=item 18
To uninstall the interim fix that was installed in the previous example.
B<updatenode xcatsn11 -V -S -c emgr_flags="-r -L IZ38930TL0">
=item 18
=item 19
To update the security keys for the node "node01"
B<updatenode node01 -k>
=item 19
=item 20
To update the service nodes with the files to be synchronized to node group compute:
+75
View File
@@ -0,0 +1,75 @@
=head1 NAME
B<tabch> - Add, delete or update rows in the database tables.
=head1 SYNOPSIS
I<tabch [-h| --help]>
I<tabch [-v| --version]>
I<tabch [keycolname=keyvalue] [tablename.colname=newvalue] >
I<tabch [keycolname=keyvalue] [tablename.colname+=newvalue] >
I<tabch -d [keycolname=keyvalue] [tablename.colname=newvalue] >
=head1 DESCRIPTION
The tabch command adds, deletes or updates the attribute value in the specified table.column for the specified keyvalue. The difference between tabch and chtab is tabch runs as a plugin under the xcatd daemon. This give the additional security of being authorized by the daemon. Normally, the given value will completely replace the current attribute value. But if "+=" is used instead of "=", the specified value will be appended to the coma separated list of the attribute, if it is not already there.
=head1 OPTIONS
B<-h> Display usage message.
B<-v> Command Version.
B<-d> Delete option.
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
1. To add a node=node1 to the nodelist table with groups=all:
I<tabch node=node1 nodelist.groups=all >
2. To add a keyword (tftpdir) and value (/tftpboot) to the site table:
I<tabch key=tftpdir site.value=/tftpboot >
3. To add node1 to the nodetype table with os=rhel5:
I<tabch node=node1 nodetype.os=rhel5>
4. To change node1 in nodetype table setting os=sles:
I<tabch node=node1 nodetype.os=sles>
5. To change node1 by appending otherpkgs to the postbootscripts field in the postscripts table:
I<tabch node=node1 postscripts.postbootscripts+=otherpkgs>
6. To delete node1 from nodetype table:
I<tabch -d node=node1 nodetype>
=head1 FILES
/opt/xcat/sbin/tabch
=head1 SEE ALSO
L<tabdump(8)|tabdump.8>, L<tabedit(8)|tabedit.8>
+11 -1
View File
@@ -4,7 +4,7 @@ B<tabprune> - Deletes records from the eventlog,auditlog,isnm_perf,isnm_perf_sum
=head1 SYNOPSIS
B<tabprune> B<eventlog | auditlog> [B<-V>] B<-i> I<recid> |B<-n> I<number of records> | B<-p> I<percentage> | B<-a>
B<tabprune> B<eventlog | auditlog> [B<-V>] B<-i> I<recid> |B<-n> I<number of records> | B<-p> I<percentage> | B<-d> I<number of days> | B<-a>
B<tabprune> [B<-h>|B<--help>] [B<-v>|B<--version>]
@@ -36,6 +36,10 @@ Remove the number of records input.
Remove the percentage of records input.
=item B<-d> I<number of days>
Remove all records that occurred >= than number of days ago.
=back
=head1 RETURN VALUE
@@ -86,6 +90,12 @@ To remove 50% of the eventlog table:
B<tabprune> I<eventlog> -p 50
=item *
To remove all records that occurred >= 5 days ago in the eventlog:
B<tabprune> I<eventlog> -d 5
=back
+48
View File
@@ -0,0 +1,48 @@
=head1 NAME
B<xcatdebug> - Starts the xCAT daemon (xcatd) in trace mode.
B<xcatdebug> {B<levelnumber>}
=head1 DESCRIPTION
The xcatdebug command starts the xcatd daemon in Perl Debug Trace mode. It is to be used for diagnosing xCAT problems. The trace outputs the paramters passed into the xcatd subroutines, listed in the tracefiles. The tracefiles are located in /opt/xcat/share/xcat/tools/tracelevel<levelnumber>. The amount of trace data collected varies with the levelnumber. levelnumber 0 being the least amount of trace and increasing with the number. Additional tracelevel files can be created to suit the problem being debugged.
You must have perl-Debug-Trace installed.
Before running this command, you should stop xcatd on your system.
After running the command, you will have to kill all the xcatd processes and possibly the xcatdebug process.
Run ps -ef | grep xcatd and kill any processes
Run ps -ef | grep xcatdebug
=head1 OPTIONS
=over 6
=item B<levelnumber>
The levelnumber that will be run. This determines the filename of trace input
from /opt/xcat/share/xcat/tools/tracelevel<levelnumber>
=back
=head1 ENVIRONMENT VARIABLES
=head1 EXAMPLES
=over 2
=item *
Run the xcatdebug routine with /opt/xcat/share/xcat/tools/tracelevel0 and output to the screen:
B<xcatdebug> I<0>
=item *
Run the xcatdebug routine with /opt/xcat/share/xcat/tools/tracelevel1 and output to /tmp/traceoutput:
B<xcatdebug> I<1> > /tmp/traceoutput 2>&1
=back
+59 -23
View File
@@ -101,7 +101,7 @@ This sample configuration file is for a 2 building block cluster.
# The nameservers in site table will be set with the value of master automatically.
xcat-service-lan:
# IP range used for DHCP. If you set the entry, the networks table will be filled
# IP range used for DHCP. If you set the entry, the networks table will be filled
# automatically with this range and the dhcp interface will be set in the site table.
dhcp-dynamic-range = 50.0.0.0-50.0.0.200
@@ -115,13 +115,22 @@ This sample configuration file is for a 2 building block cluster.
num-frames-per-hmc = 3
# this lists which serial numbers go with which frame numbers
vpd-file = vpd2bb.stanza
# There are two rules of defining FSP/BPAs. The first defining the node's host name by increasing the last bit
# of IP address, while the second defining the node's name by varying the second bit and the third bit of IP.
# This assumes you have 2 service LANs: a primary service LAN 10.230.0.0/255.255.0.0 that all of the port 0's
# are connected to, and a backup service LAN 10.231.0.0/255.255.0.0 that all of the port 1's are connected to.
bpa-a-0-starting-ip = 10.230.1.1
bpa-b-0-starting-ip = 10.230.2.1
bpa-a-1-starting-ip = 10.231.1.1
bpa-b-1-starting-ip = 10.231.2.1
# bpa-a-0-starting-ip = 10.230.1.1
# bpa-b-0-starting-ip = 10.230.2.1
# bpa-a-1-starting-ip = 10.231.1.1
# bpa-b-1-starting-ip = 10.231.2.1
# This assumes you have 2 service LANs: a primary service LAN 40.x.y.z/255.0.0.0 that all of the port 0's
# are connected to, and a backup service LAN 41.x.y.z/255.0.0.0 that all of the port 1's are connected to.
# "x" is the frame number and "z" is the bpa/fsp id (1 for the first BPA/FSP in the Frame/CEC, 2 for the
# second BPA/FSP in the Frame/CEC). For BPAs "y" is always be 0 and for FSPs "y" is the cec id.
vlan-1 = 40
vlan-2 = 41
xcat-cecs:
# These are the connections to the CECs. Either form of hostname is supported.
#hostname-range = cec01-cec64
@@ -134,13 +143,13 @@ This sample configuration file is for a 2 building block cluster.
supernode-list = supernodelist2bb.txt
# If you do not want to specify the supernode-list at this time and you have a consistent
# number of cecs in each frame, you can instead just use this setting:
#num-cecs-per-frame = 12
fsp-a-0-starting-ip = 10.230.3.1
fsp-b-0-starting-ip = 10.230.4.1
fsp-a-1-starting-ip = 10.231.3.1
fsp-b-1-starting-ip = 10.231.4.1
num-cecs-per-frame = 12
#fsp-a-0-starting-ip = 10.230.3.1
#fsp-b-0-starting-ip = 10.230.4.1
#fsp-a-1-starting-ip = 10.231.3.1
#fsp-b-1-starting-ip = 10.231.4.1
xcat-building-blocks:
num-frames-per-bb = 3
num-cecs-per-bb = 32
@@ -149,7 +158,8 @@ This sample configuration file is for a 2 building block cluster.
num-lpars-per-cec = 8
# If you set these, then do not set the corresponding attributes in the other node stanzas below.
# Except you still need to set xcat-service-nodes:starting-ip (which is the ethernet adapter)
hostname-range = f[1-6]c[01-12]p[1-8]
#hostname-range = f[1-6]c[01-12]p[1-8]
hostname-range = f[1-6]c[01-12]p[01,05,09,13,17,21,25,29]
starting-ip = 10.1.1.1
aliases = -hf0
# ml0 is for aix. For linux, use bond0 instead.
@@ -162,7 +172,7 @@ This sample configuration file is for a 2 building block cluster.
# this is for the ethernet NIC on each SN
#hostname-range = sn1-sn4
starting-ip = 10.10.1.1
# this value is the same format as the hosts.otherinterfaces attribute except
# this value is the same format as the hosts.otherinterfaces attribute except
# the IP addresses are starting IP addresses
#otherinterfaces = -hf0:10.10.1.1,-hf1:10.11.1.1,-hf2:10.12.1.1,-hf3:10.13.1.1,-ml0:10.14.1.1
@@ -247,9 +257,14 @@ VPD data or supernode numbers at this time.
hostname-range = frame[1-2]
xcat-cecs:
hostname-range = cec[01-24]
#hostname-range = cec[01-24]
hostname-range = f[1-2]c[01-12]
num-cecs-per-frame = 12
xcat-lpars:
hostname-range = f[1-2]c[01-12]p[01,05,09,13,17,21,25,29]
=head2 Database Attributes Written
The following lists which database attributes are filled in as a result of each stanza. Note that depending on the values
@@ -265,7 +280,7 @@ site table: domain, nameservers, topology
site table: ea_primary_hmc, ea_backup_hmc
nodelist table: node, groups (all HMCs (hmc) )
nodelist table: node, groups (all HMCs (hmc) ), hidden
hosts table: node, ip
@@ -275,11 +290,21 @@ nodetype table: node, nodetype
=item B<xcat-frames>
nodelist table: node, groups (all frames (frame) )
nodelist table: node, groups (all frames (frame) ), hidden
hosts table: node, ip
ppc table: node, id, hcp, nodetype, sfp
ppc table: node, id, hcp
nodetype table: node, nodetype
nodehm table: node, mgt
vpd table: node, serial, mtm, side
=item B<xcat-bpas>
nodelist table: node, groups (bpa,all) , hidden
ppc table: node, id, hcp, nodetype, parent
nodetype table: node, nodetype
@@ -289,9 +314,8 @@ vpd table: node, serial, mtm, side
=item B<xcat-cecs>
nodelist table: node, groups (all CECs (cec), all CECs in a frame (<frame>cec) )
nodelist table: node, groups (all CECs (cec), all CECs in a frame (<frame>cec) ), hidden
hosts table: node, ip
ppc table: node, supernode, hcp, id, parent
@@ -303,9 +327,21 @@ nodegroup table: groupname, grouptype, members, wherevals (all nodes in a CEC (
nodepos: rack, u
=item B<xcat-fsps>
nodelist table: node, groups (fsp,all), hidden
ppc table: node, id, hcp, nodetype, parent
nodetype table: node, nodetype
nodehm table: node, mgt
vpd table: node, serial, mtm, side
=item B<xcat-building-blocks>
site table: sharedtftp
site table: sharedtftp, sshbetweennodes(service)
ppc table: node, parent (for frame)
+137 -6
View File
@@ -24,7 +24,7 @@ use strict;
dumpxCATdb -p <directory to place database dump>
See man page.
=cut
@@ -33,6 +33,25 @@ use strict;
my $rc = 0;
my $cmd;
&parse_args;
if ($::BINARY) { # not using xCAT to dump, using the database utility
my $DBname = xCAT::Utils->get_DBName;
if ($DBname eq "DB2") {
$rc=&DB2_bindump;
if ($rc == 0) {
xCAT::MsgUtils->message("I", "Backup Complete.");
} else {
xCAT::MsgUtils->message("I", "Backup Failed.");
}
exit $rc;
} else {
xCAT::MsgUtils->message("E",
"Binary dump (-b) is only supported for DB2");
exit 1;
}
}
# Dump using xCAT utilities
my @output = xCAT::Utils->runcmd("tabdump", 0);
if ($::RUNCMD_RC != 0)
{ # error
@@ -40,11 +59,17 @@ if ($::RUNCMD_RC != 0)
"Error running tabdump to get list of tables");
exit 1;
}
# read tables to skip during dump from site.skiptables attribute
my @output2=xCAT::Utils->get_site_attribute('skiptables');
# Determine which table to skip
my @output2;
if ($ENV{'XCAT_SKIPTABLES'}) {
@output2=$ENV{'XCAT_SKIPTABLES'};
} else {
# read tables to skip from site.skiptables attribute
@output2=xCAT::Utils->get_site_attribute('skiptables');
}
my @skiptbls;
if (@output2) {
@skiptbls = split (/\,/,$output2[0]);
@skiptbls = split (/\,/,$output2[0]);
}
foreach my $table (@output)
{
@@ -62,7 +87,14 @@ foreach my $table (@output)
}
next;
}
# skip and table in the site.skiptables attribute
# skip ISNM tables except isnm_config
if ( $table =~ /^isnm_perf/ ) {
if ($::DUMPVERBOSE) {
xCAT::MsgUtils->message("I", "Skipping $table\n");
}
next;
}
# skip any table in the site.skiptables attribute
if (grep(/^$table$/, @skiptbls)) {
if ($::DUMPVERBOSE) {
xCAT::MsgUtils->message("I", "Skipping $table\n");
@@ -98,13 +130,14 @@ sub parse_args
{
my $msg;
my $usagemsg =
" dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-a] [-V] <-p> [path to dump directory]";
" dumpxCATdb -h \n dumpxCATdb -v \n dumpxCATdb [-a] [-V] <-p> [path to backup directory] \n dumpxCATdb -b [-V] <-p> [path to backup directory]";
Getopt::Long::Configure("posix_default");
Getopt::Long::Configure("no_gnu_compat");
Getopt::Long::Configure("bundling");
if (
!GetOptions(
'a|all' => \$::ALL,
'b|bin' => \$::BINARY,
'p|path=s' => \$::PATH,
'h|help' => \$::HELP,
'V|verbose' => \$::DUMPVERBOSE,
@@ -147,3 +180,101 @@ sub parse_args
}
#-----------------------------------------------------------------------------
=head3 DB2_bindump
Uses the DB2 Database supplied backup utility to backup the database
=cut
#-----------------------------------------------------------------------------
sub DB2_bindump
{
my $msg;
my $rc=0;
# check to see if they are setup to do an online dump
# Database has to have defined logretain RECOVERY and there
# must already been taken an offline backup.
my $cmd="db2 get database configuration for xcatdb > /tmp/db2output";
$rc = &rundb2cmd($cmd); # must su to xcatdb
if ($rc != 0)
{
xCAT::MsgUtils->message("E", " $cmd error.");
return 1;
}
# check to see if they setup log recover
$cmd = " egrep -i \"Log retain for recovery enabled\" /tmp/db2output";
my @output=xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("E", "Log retain for recovery enabled (LOGRETAIN) = RECOVERY must be set to perform ONLINE Backups and one ONLINE backup must have been taken. See xCAT DB2 documentation. The section - Backup/Restore the database with DB2 Commands.");
return 1;
} else { # check to see if LOGRETAIN is ON
if (!grep(/ = RECOVERY/, @output)) {
xCAT::MsgUtils->message("E", "Log retain for recovery enabled (LOGRETAIN) = RECOVERY must be set to perform ONLINE Backups and one ONLINE backup must have been taken. See xCAT DB2 documentation. The section - Backup/Restore the database with DB2 Commands.");
return 1;
}
}
# check to see if they have one backup
$cmd = " ls $::PATH";
@output=xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("E", "One ONLINE backup must have been taken and exist in $::PATH. See xCAT DB2 documentation. The section - Backup/Restore the database with DB2 Commands.");
return 1;
} else { # check to see if LOGRETAIN is ON
if (!grep(/XCATDB/, @output)) {
xCAT::MsgUtils->message("E", "One ONLINE backup must have been taken and exist in $::PATH. See xCAT DB2 documentation. The section - Backup/Restore the database with DB2 Commands.");
return 1;
}
}
# finally all checks ok, can take an ONLINE backup
# get password from cfgloc
my $cmd="cat /etc/xcat/cfgloc";
my $info=xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("E", "Cannot read /etc/xcat/cfgloc.");
return 1;
}
chomp($info);
my ($db,$inst,$pw) = split(/\|/, $info);
my $cmd=" db2 backup db xcatdb user xcatdb using $pw ONLINE to $::PATH";
$rc = &rundb2cmd($cmd); # must su to xcatdb
if ($rc != 0)
{
xCAT::MsgUtils->message("E", " $cmd error.");
return 1;
}
return 0;
}
#-----------------------------------------------------------------------------
=head3 rundb2cmd
Run a commmand as the xcatdb instance id
Input: command
=cut
#-----------------------------------------------------------------------------
sub rundb2cmd
{
my $orgcmd = shift;
my $rc = 0;
my $cmd = "\'";
$cmd .= $orgcmd;
$cmd .= ' 2>&1';
$cmd .= "\'";
system("su - xcatdb -c $cmd");
if ($? > 0) # error
{
$rc = $? >> 8;
}
return ($rc);
}
+3 -2
View File
@@ -35,8 +35,9 @@ then
fi
nodes=`echo $1 |sed "s/,/ /g"`
if [ -n "$ETH" ]; then
nodes=`echo $nodes |sed "s/ /-$ETH /g"`
if [ -n "$ETH" ]; then
nodes=`echo $nodes |sed "s/-hf[0-9]//g"`
nodes=`echo $nodes |sed "s/ /-$ETH /g"`
nodes="$nodes-$ETH"
fi
+109 -2
View File
@@ -24,6 +24,7 @@ use strict;
restorexCATdb -p <directory containing db restore .csv files>
restorexCATdb -b -p <directory binary database backup>
=cut
@@ -33,7 +34,22 @@ use strict;
my $rc = 0;
&parse_args;
if ($::BINARY) { # not using xCAT to dump, using the database utility
my $DBname = xCAT::Utils->get_DBName;
if ($DBname eq "DB2") {
$rc=&DB2_binrestore;
if ($rc == 0) {
xCAT::MsgUtils->message("I", "Restore Complete. You can now restart the daemons.");
} else {
xCAT::MsgUtils->message("E", "Restore Failed.");
}
exit $rc;
} else {
xCAT::MsgUtils->message("E",
"Binary restore (-b) is only supported for DB2");
exit 1;
}
}
# read all the *.csv files from the input directory and restore the database
opendir DIRPATH, $::PATH;
if ($? != 0)
@@ -71,6 +87,14 @@ foreach my $table (@files)
}
next;
}
# skip ISNM tables except isnm_config
if ( $table =~ /^isnm_perf/ ) {
if ($::DUMPVERBOSE) {
xCAT::MsgUtils->message("I", "Skipping $table\n");
}
next;
}
# skip and table in the site.skiptables attribute
if (@skiptbls) {
my ($tmptable,$suffix) = split(/\./,$table);
@@ -112,14 +136,16 @@ sub parse_args
{
my $msg;
my $usagemsg =
" restorexCATdb -h \n restorexCATdb -v \n restorexCATdb [-a] [-V] <-p> [path to restore .csv files]\n";
" restorexCATdb -h \n restorexCATdb -v \n restorexCATdb [-a] [-V] <-p> [path to restore .csv files]\n restorexCATdb -b [-V] <-t> [timestamp on restore backup file] <-p> [path to restore backup file]";
Getopt::Long::Configure("posix_default");
Getopt::Long::Configure("no_gnu_compat");
Getopt::Long::Configure("bundling");
if (
!GetOptions(
'a|all' => \$::ALL,
'b|binary' => \$::BINARY,
'p|path=s' => \$::PATH,
't|timestamp=s' => \$::TIMESTAMP,
'h|help' => \$::HELP,
'V|verbose' => \$::VERBOSEREST,
'v|version' => \$::VERSION
@@ -156,4 +182,85 @@ sub parse_args
}
}
#-----------------------------------------------------------------------------
=head3 DB2_binrestore
Uses the DB2 Database supplied restore utility to restore the database
=cut
#-----------------------------------------------------------------------------
sub DB2_binrestore
{
my $msg;
my $rc=0;
if (!($::TIMESTAMP)){
xCAT::MsgUtils->message("E", "To restore from a binary backup, the timestamp of the backup must be provided with the -t option.");
return 1;
}
# check to see if xcatd running. Cannot restore if it is
my $cmd = "ps -ef | grep xcatd";
my @output=xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0) { # found something
if (grep(/xcatd: SSL listener/, @output)) { # xcatd running
xCAT::MsgUtils->message("E", "xcatd is still accessing the database. All applications accessing the DB2 database must be stopped before you can restore.");
return 1;
}
}
# get password from cfgloc
my $cmd="cat /etc/xcat/cfgloc";
my $info=xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0) {
xCAT::MsgUtils->message("E", "Cannot read /etc/xcat/cfgloc.");
return 1;
}
chomp($info);
my ($db,$inst,$pw) = split(/\|/, $info);
# Hopefully nothing else is accessing the database, so try restore
$cmd="db2 restore db xcatdb user xcatdb using $pw from $::PATH taken at $::TIMESTAMP";
$rc = &rundb2cmd($cmd); # must su to xcatdb
if ($rc != 0)
{
xCAT::MsgUtils->message("E", " $cmd error.");
return 1;
}
# Now roll forward any tranactions since the backup
$cmd="db2 rollforward database xcatdb to end of logs and complete";
$rc = &rundb2cmd($cmd); # must su to xcatdb
if ($rc != 0)
{
xCAT::MsgUtils->message("E", " $cmd error.");
return 1;
}
return 0;
}
#-----------------------------------------------------------------------------
=head3 rundb2cmd
Run a commmand as the xcatdb instance id
Input: command
=cut
#-----------------------------------------------------------------------------
sub rundb2cmd
{
my $orgcmd = shift;
my $rc = 0;
my $cmd = "\'";
$cmd .= $orgcmd;
$cmd .= ' 2>&1';
$cmd .= "\'";
system("su - xcatdb -c $cmd");
if ($? > 0) # error
{
$rc = $? >> 8;
}
return ($rc);
}
+20 -6
View File
@@ -30,6 +30,7 @@ Requires: expat
xCAT-client provides the xCAT commands (chtab, chnode, rpower, etc) helpful in administrating systems at scale, with particular attention paid to large HPC clusters.
%prep
%setup -q -n xCAT-client
%build
# This phase is done in (for RH): /usr/src/redhat/BUILD/xCAT-client-2.0
@@ -148,6 +149,7 @@ ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/swapnodes
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/nodegrpch
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/tabdump
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/tabprune
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/tabch
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/packimage
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/rmimage
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/sbin/makedns
@@ -216,23 +218,35 @@ rm -rf $RPM_BUILD_ROOT
* Tue Feb 20 2007 Jarrod Johnson <jbjohnso@us.ibm.com>
- Start core rpm for 1.3 work
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%ifos linux
cat << EOF > /etc/profile.d/xcat.sh
XCATROOT=$RPM_INSTALL_PREFIX0
PATH=\$PATH:\$XCATROOT/bin:\$XCATROOT/sbin
MANPATH=\$MANPATH:\$XCATROOT/share/man:
PATH=\$XCATROOT/bin:\$XCATROOT/sbin:\$PATH
MANPATH=\$XCATROOT/share/man:\$MANPATH
export XCATROOT PATH MANPATH
export PERL_BADLANG=0
EOF
cat << EOF > /etc/profile.d/xcat.csh
setenv XCATROOT "$RPM_INSTALL_PREFIX0"
setenv PATH \${PATH}:\${XCATROOT}/bin:\${XCATROOT}/sbin
setenv PATH \${XCATROOT}/bin:\${XCATROOT}/sbin:\${PATH}
if !(\$?MANPATH) then
setenv MANPATH \${XCATROOT}/share/man:
else
setenv MANPATH \${MANPATH}:\${XCATROOT}/share/man:
setenv MANPATH \${XCATROOT}/share/man:\${MANPATH}
endif
setenv PERL_BADLANG 0
EOF
@@ -249,8 +263,8 @@ if ! egrep XCATROOT /etc/profile > /dev/null 2>&1 ; then
echo "
# xCAT setup
XCATROOT=$RPM_INSTALL_PREFIX0
PATH=\$PATH:\$XCATROOT/bin:\$XCATROOT/sbin
MANPATH=\$MANPATH:\$XCATROOT/share/man:
PATH=\$XCATROOT/bin:\$XCATROOT/sbin:$PATH
MANPATH=\$XCATROOT/share/man:\$MANPATH
export XCATROOT PATH MANPATH
" >>/etc/profile
fi
+14 -12
View File
@@ -146,6 +146,7 @@ sub parse_lsrsrc_output
my %count = {};
foreach $line (@$output){
if ($line =~ /^ERROR/) { next;} #skip the lines with error
@value = split /::/, $line;
$name = $value[0];
$name =~ s/[^A-Za-z0-9]+/'.'/;
@@ -211,7 +212,7 @@ sub getmetrix
my @output = ();
my $rrd = undef;
my $line = undef;
my $ret = undef;
my $ret = 0;
my $msg = undef;
my $cmd = undef;
@@ -243,25 +244,26 @@ sub getmetrix
if($rname eq "__ALL__"){
$cmd = "CT_MANAGEMENT_SCOPE=3 lsrsrc-api -i -s $rsrc"."::::Name::NodeNameList::$attr";
@output = xCAT::Utils->runcmd($cmd, 0);
if($::RUNCMD_RC != 0){
$line = join '', @output;
return ($::RUNCMD_RC, $line);
}
@output = xCAT::Utils->runcmd($cmd, -1);
#if($::RUNCMD_RC != 0){
# $line = join '', @output;
# return ($::RUNCMD_RC, $line);
#}
#print "+++++ rsrc=$rsrc\nattrs=@attrs\noutput=@output\n";
&parse_lsrsrc_output($rsrc, \@attrs, \@output);
} else {
@names = split /,/, $rname;
foreach $name (@names){
$cmd = "CT_MANAGEMENT_SCOPE=3 lsrsrc-api -i -s $rsrc"."::\'Name==\"$name\"\'::Name::NodeNameList::$attr";
@output = xCAT::Utils->runcmd($cmd, 0);
if($::RUNCMD_RC){
$line = join '', @output;
return ($::RUNCMD_RC, $line);
}
@output = xCAT::Utils->runcmd($cmd, -1);
#if($::RUNCMD_RC){
# $line = join '', @output;
# return ($::RUNCMD_RC, $line);
#}
#print "--- rsrc=$rsrc\nattrs=@attrs\noutput=@output\n";
&parse_lsrsrc_output($rsrc, \@attrs, \@output);
}
}
foreach $attr (keys %metrix){
foreach $nnlist (keys %{$metrix{$attr}}){
if(($nnlist ne 'summary') && ($nnlist ne 'number')){
+15 -1
View File
@@ -890,7 +890,9 @@ sub getNodeID {
my $tmp=$tab->getNodeAttribs($node, ['mac']);
if (defined($tmp) && ($tmp)) {
my $mac=$tmp->{mac};
$mac =~ s/://g;
$mac =~ s/\|.*//g; #use the first mac
$mac =~ s/\!.*//g; #remove the hostname
$mac =~ s/://g; #remove :
$mac = "EA" . $mac . "EA";
$tab->close();
return $mac;
@@ -1148,6 +1150,18 @@ sub addNodes {
}
}
#check if hmc node added to management domain successfully
my $n = 6;
while($n > 0){
$result = `/usr/sbin/rsct/bin/rmcdomainstatus -s ctrmc | grep $node`;
if ($result =~ /\s$node\s/){
last;
} else {
sleep 10;
$n = $n - 1;
}
}
#define AllServiceableEvents_B condition on the HMC
$result=`CT_MANAGEMENT_SCOPE=3 /usr/bin/mkrsrc-api IBM.Condition::Name::"AllServiceableEvents_B"::ResourceClass::"IBM.Sensor"::EventExpression::"String=?\\\"LSSVCEVENTS_ALL%\\\""::SelectionString::"Name=\\\"CSMServiceableEventSensor\\\""::NodeNameList::{\\\"$node\\\"}::EventBatchingInterval::1::BatchedEventRetentionPeriod::72 2>&1`;
if (($?) && ($result !~ /2618-201|2618-008|2636-050/)){
+13 -5
View File
@@ -24,6 +24,7 @@ Provides: xCAT-rmc = %{version}
Provides RMC monitoring plug-in module for xCAT, configuration scripts, predefined conditions, responses and sensors.
%prep
%setup -q -n xCAT-rmc
%build
%install
@@ -75,6 +76,18 @@ rm -rf $RPM_BUILD_ROOT
%changelog
%pre
# only need to check on AIX
%ifnos linux
if [ -x /usr/sbin/emgr ]; then # Check for emgr cmd
/usr/sbin/emgr -l 2>&1 | grep -i xCAT # Test for any xcat ifixes - msg and exit if found
if [ $? = 0 ]; then
echo "Error: One or more xCAT emgr ifixes are installed. You must use the /usr/sbin/emgr command to uninstall each xCAT emgr ifix prior to RPM installation."
exit 2
fi
fi
%endif
%post
%ifos linux
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
@@ -95,8 +108,3 @@ rm -rf $RPM_BUILD_ROOT
%endif
exit 0
+161 -44
View File
@@ -48,6 +48,7 @@ my %modules = (
rscan => { hmc => "xCAT::PPCscan",
fsp => "xCAT::FSPscan",
cec => "xCAT::FSPscan",
ivm => "xCAT::PPCscan",
},
mkvm => { hmc => "xCAT::PPCvm",
fsp => "xCAT::FSPvm",
@@ -170,7 +171,7 @@ sub process_command {
my %nodes = ();
my $callback = $request->{callback};
my $sitetab = xCAT::Table->new( 'site' );
my @site = qw(ppcmaxp ppctimeout maxssh ppcretry fsptimeout powerinterval);
my @site = qw(ppcmaxp ppctimeout maxssh ppcretry fsptimeout powerinterval syspowerinterval);
my $start;
my $verbose = $request->{verbose};
@@ -182,6 +183,8 @@ sub process_command {
$request->{fsptimeout} = 0;
$request->{ppcretry} = 3;
$request->{maxssh} = 8;
$request->{powerinterval} = 0;
$request->{syspowerinterval} = 0;
#######################################
# Get site table attributes
@@ -404,11 +407,18 @@ sub process_command {
my $sessions;
my $pid_owner;
my $remain_node = $nodes;
my $num = 0;
while ( scalar($remain_node) ) {
$remain_node = ();
foreach my $hash ( @$nodes ) {
$SIG{CHLD} = sub { my $pid = 0; while (($pid = waitpid(-1, WNOHANG)) > 0) { $hw->{$pid_owner->{$pid}}--; $children--; } };
$SIG{INT} = $SIG{TERM} = $SIG{KILL} = sub { #prepare to process job termination and propogate it down
foreach my $pid (keys %{$pid_owner}) {
&kill_children_by_pid($pid);
}
exit 0;
};
while ( $children >= $request->{ppcmaxp} ) {
my $handlednodes={};
@@ -434,9 +444,23 @@ sub process_command {
push( @$remain_node, [@$hash[0], @$hash[1]] );
next;
}
if( $num > 0 && $request->{op} =~ /^on/ && $request->{fsp_api} == 1) {
my $t_hash = @$hash[1];
my $one_key_in_thash = (keys %$t_hash)[0];
my $one_d = $t_hash->{$one_key_in_thash};
#print Dumper($one_d);
if($$one_d[4] =~ /^fsp$/ || $$one_d[4] =~ /^cec$/) {
if( $request->{syspowerinterval} > 0) {
no_interrupt_sleep($request->{syspowerinterval});
}
}
}
my ($pipe,$pid) = fork_cmd( @$hash[0], @$hash[1], $request );
$num++;
if ($pid) {
$pid_owner->{$pid} = @$hash[0];
$hw->{@$hash[0]}++;
@@ -453,7 +477,14 @@ sub process_command {
} elsif ( $request->{command} =~ /^rspconfig$/&& exists( $request->{opt}->{resetnet} ) ) {
runcmd( $request );
} else {
my %pid_owner = ();
$SIG{CHLD} = sub { while (waitpid(-1, WNOHANG) > 0) { $children--; } };
$SIG{INT} = $SIG{TERM} = $SIG{KILL} = sub { #prepare to process job termination and propogate it down
foreach my $pid (keys %pid_owner) {
&kill_children_by_pid($pid);
}
exit 0;
};
my $hw;
my $sessions;
@@ -481,8 +512,9 @@ sub process_command {
}
$hw = @$_[0];
my ($pipe) = fork_cmd( @$_[0], @$_[1], $request );
my ($pipe,$pid) = fork_cmd( @$_[0], @$_[1], $request );
if ( $pipe ) {
$pid_owner{$pid} = $pid;
$fds->add( $pipe );
$children++;
}
@@ -543,6 +575,30 @@ ENDOFFORK:
return(0);
}
sub no_interrupt_sleep {
my $sleep_time = shift;
my $sleep_end = time + $sleep_time;
while (1) {
my $sleep_duration = $sleep_end - time;
last if $sleep_duration <= 0;
Time::HiRes::sleep($sleep_duration);
}
}
sub kill_children_by_pid {
my $pid = shift;
my @pids = `ps -o pid,ppid -e`;
for my $a_pid (@pids) {
if( $a_pid =~ /\s*(\d*)\s*(\d*)/ ) {
my $tmp_pid = $1;
my $tmp_ppid = $2;
if($tmp_ppid == $pid) {
kill 9, $tmp_pid;
}
}
}
}
##########################################################################
# updateNodeStatus
##########################################################################
@@ -1297,11 +1353,11 @@ sub handle_find_hw_children {
if (!defined($vpdtab) or !defined($child_type)) {
return undef;
}
my $mtms = $vpdtab->getAttribs({node=>$host}, qw(serial mtm));
my $mtms = $vpdtab->getNodeAttribs($host, qw(serial mtm));
if (!defined($mtms)) {
return undef;
}
my @nodearray = $vpdtab->getAttribs({serial=>$mtms->{serial}, mtm=>$mtms->{mtm}}, qw(node side));
my @nodearray = $vpdtab->getAttribs({serial=>$mtms->{serial}, mtm=>$mtms->{mtm}}, qw(node side)); # need regx
if (!defined(@nodearray)) {
return undef;
}
@@ -1398,6 +1454,7 @@ sub process_children {
if (defined($conn_flag{$dir})) {
next;
}
$request->{$index->{node}}{cred} = $request->{$host}{cred};
my $res = &handle_cmd($index->{node}, $host, $request);
$output{$side} = \$res;
if ($res->[0]->{errorcode} ne '128') {
@@ -1768,25 +1825,44 @@ sub preprocess_request {
# get the HCPs for the LPARs in order to figure out which service
# nodes to send the requests to
###################################################################
my $hcptab_name = ($package eq "fsp" or $package eq "bpa") ? "ppcdirect" : "ppchcp";
my $hcptab = xCAT::Table->new( $hcptab_name );
unless ($hcptab ) {
$callback->({data=>["Cannot open $hcptab_name table"]});
$req = {};
return;
}
#my $hcptab_name = ($package eq "fsp" or $package eq "bpa") ? "ppcdirect" : "ppchcp";
#my $hcptab = xCAT::Table->new( $hcptab_name );
#unless ($hcptab ) {
# $callback->({data=>["Cannot open $hcptab_name table"]});
# $req = {};
# return;
#}
# Check if each node is hcp
my %hcp_hash=();
my @missednodes=();
foreach ( @$noderange ) {
my ($ent) = $hcptab->getAttribs( {hcp=>$_},"hcp" );
if ( !defined( $ent )) {
push @missednodes, $_;
next;
}
push @{$hcp_hash{$_}{nodes}}, $_;
my $support_hcp_type;
# in the DFM model, cec/fsp/Frame/bpa can be hcp.
if ($package eq "fsp" or $package eq "bpa") {
$support_hcp_type = "(fsp|cec|bpa|frame)";
# in the HMC model, only hmc can be hcp.
} elsif ($package eq "hmc") {
$support_hcp_type = "hmc";
# package equal 'ivm', only ivm can be hcp.
} else {
$support_hcp_type = "ivm";
}
foreach ( @$noderange ) {
my $nodetype = xCAT::DBobjUtils->getnodetype($_);
if ($nodetype and $nodetype =~ /$support_hcp_type/) {
push @{$hcp_hash{$_}{nodes}}, $_;
} else {
push @missednodes, $_;
}
}
#foreach ( @$noderange ) {
# my ($ent) = $hcptab->getNodeAttribs( $_,"hcp" );
# if ( !defined( $ent )) {
# push @missednodes, $_;
# next;
# }
# push @{$hcp_hash{$_}{nodes}}, $_;
#}
#check if the left-over nodes are lpars
if (@missednodes > 0) {
my $ppctab = xCAT::Table->new("ppc");
@@ -1796,11 +1872,6 @@ sub preprocess_request {
return;
}
foreach my $node (@missednodes) {
my ($ent) = $ppctab->getAttribs({hcp=>$node}, "hcp");
if (defined($ent)) {
push @{$hcp_hash{$node}{nodes}}, $node;
next;
}
my $ent=$ppctab->getNodeAttribs($node,['hcp']);
#if (defined($ent->{hcp})) { push @{$hcp_hash{$ent->{hcp}}{nodes}}, $node;}
@@ -1818,15 +1889,33 @@ sub preprocess_request {
}
}
# find service nodes for the HCPs
my @masters = xCAT::Utils->get_site_attribute("master");
#When run mkhwconn/lshwconn/rmhwconn with -T fnm for CNM, it will send the command to CEC/Frame direclty,
#not through the service node if specified.
if ((($req->{command}->[0] eq "mkhwconn") || ($req->{command}->[0] eq "lshwconn" ) || ($req->{command}->[0] eq "rmhwconn" ))
&& ( $req->{opt}->{T} == 1) ) {
#for fnm
my $reqcopy = {%$req};
#my @masters = xCAT::Utils->get_site_attribute("master");
if( $masters[0] ) {
$reqcopy->{'_xcatdest'} = $masters[0];
push @requests,$reqcopy;
} else {
$callback->({data=>["The value of the attribute master in the site table is NOT set"]});
$req = {};
return;
}
} else {
# find service nodes for the HCPs
# 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");
# build each request for each service node
foreach my $snkey (keys %$sn)
{
foreach my $snkey (keys %$sn)
{
#$callback->({data=>["The service node $snkey "]});
my $reqcopy = {%$req};
$reqcopy->{'_xcatdest'} = $snkey;
@@ -1842,8 +1931,30 @@ sub preprocess_request {
$reqcopy->{node} = \@nodes;
#print "nodes=@nodes\n";
push @requests, $reqcopy;
if(($req->{command}->[0] eq "rflash") && ( exists( $req->{opt}->{activate} ) ) ) {
my $linuxrequired = 0;
if ( xCAT::Utils->isLinux() ) {
my @installloc = xCAT::Utils->get_site_attribute("installloc");
if (! ($installloc[0])) {
$linuxrequired = 1;
}
}
if ( ($linuxrequired || xCAT::Utils->isAIX()) && ( $masters[0] ne $snkey )) {
my $install_dir = xCAT::Utils->getInstallDir();
my $cmd = "$::XCATROOT/bin/xdcp $snkey -R $install_dir/packages_fw $install_dir/";
my $result = xCAT::Utils->runcmd("$cmd", -1);
if ($::RUNCMD_RC != 0) {
$callback->({data=>["$result. Could not copy rpms in the $install_dir/packages_fw to $snkey.\n"]});
$req = {};
return;
}
}
}
}
}
# No dependency, use the original logic
if (scalar(@{$nodeseq}) == 1) {
return \@requests;
@@ -2064,7 +2175,11 @@ sub process_request {
#my $thishcp_type = xCAT::FSPUtils->getTypeOfNode($thishcp,$callback);
my $thishcp_type = xCAT::DBobjUtils->getnodetype($thishcp);
if(!defined($thishcp_type)) {
$request = {};
my %output = ();
$output{node}->[0]->{name} = [$node];
$output{node}->[0]->{data} = ["the type of $node\'s hcp is not defined in the 'ppc' table."];
$output{errorcode} = '1';
$callback-> (\%output);
next;
}
#print "lasthcp_type:$lasthcp_type ;thishcp_type:$thishcp_type\n";
@@ -2114,22 +2229,24 @@ sub process_request {
if ($request_new->{command} =~ /^(rspconfig|rpower|reventlog)$/){
my @enableASMI = xCAT::Utils->get_site_attribute("enableASMI");
if (defined($enableASMI[0])) {
$enableASMI[0] =~ tr/a-z/A-Z/; # convert to upper
if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) {
#through asmi ......
$request_new->{fsp_api} = 0;
if(@failed_nodes != 0) {
my @temp = @failed_nodes;
@failed_nodes = ();
$request_new->{node} = \@temp;
process_command( $request_new , \%hcps_will, \@failed_nodes, \%failed_msg);
} #end of if
} #end of if
} # end of if
} #end of if
if (($request_new->{command} !~ /^rspconfig$/) ||
(ref($request_new->{method} eq 'HASH'))) {
$enableASMI[0] =~ tr/a-z/A-Z/; # convert to upper
if (($enableASMI[0] eq "1") || ($enableASMI[0] eq "YES")) {
#through asmi ......
$request_new->{fsp_api} = 0;
if(@failed_nodes != 0) {
my @temp = @failed_nodes;
@failed_nodes = ();
$request_new->{node} = \@temp;
process_command( $request_new , \%hcps_will, \@failed_nodes, \%failed_msg);
} #end of if
} #end of if
} # end of if
} #end of if
}
} #end of if
} #end of while(1)
}
##########################################################################
+30 -2
View File
@@ -538,6 +538,11 @@ sub makescript
if ($ospkglist)
{
my $pkgtext = get_pkglist_tex($ospkglist);
my ($envlist,$pkgtext) = get_envlist($pkgtext);
if ($envlist) {
push @scriptd, "ENVLIST='".$envlist."'\n";
push @scriptd, "export ENVLIST\n";
}
if ($pkgtext)
{
push @scriptd, "OSPKGS='".$pkgtext."'\n";
@@ -555,7 +560,13 @@ sub makescript
foreach (@sublists)
{
$sl_index++;
push @scriptd, "OTHERPKGS$sl_index='".$_."'\n";
my $tmp = $_;
my ($envlist, $tmp) = get_envlist($tmp);
if ($envlist) {
push @scriptd, "ENVLIST$sl_index='".$envlist."'\n";
push @scriptd, "export ENVLIST$sl_index\n";
}
push @scriptd, "OTHERPKGS$sl_index='".$tmp."'\n";
push @scriptd, "export OTHERPKGS$sl_index\n";
}
if ($sl_index > 0)
@@ -788,6 +799,22 @@ sub makescript
#----------------------------------------------------------------------------
=head3 get_envlist
extract environment variables list from pkglist text.
=cut
#-----------------------------------------------------------------------------
sub get_envlist
{
my $envlist;
my $pkgtext = shift;
$envlist = join ' ', ($pkgtext =~ /#ENV:([^#^\n]+)#/g);
$pkgtext =~ s/#ENV:[^#^\n]+#,?//g;
return ($envlist, $pkgtext);
}
#----------------------------------------------------------------------------
=head3 get_pkglist_text
read the pkglist file, expand it and return the content.
@@ -810,7 +837,8 @@ sub get_pkglist_tex
next
if ( /^\s*#/
&& !/^\s*#INCLUDE:[^#^\n]+#/
&& !/^\s*#NEW_INSTALL_LIST#/); #-- skip comments
&& !/^\s*#NEW_INSTALL_LIST#/
&& !/^\s*#ENV:[^#^\n]+#/); #-- skip comments
if (/^@(.*)/)
{ #for groups that has space in name
my $save = $1;
+2
View File
@@ -252,6 +252,7 @@ sub getsynclistfile()
my %osimage_syncfile = ();
my @profiles = ();
if ($nodes) {
# get the profile attributes for the nodes
my $nodetype_t = xCAT::Table->new('nodetype');
unless ($nodetype_t) {
@@ -273,6 +274,7 @@ sub getsynclistfile()
push @profiles, $profile;
}
}
}
# get the syncfiles base on the osimage
my $osimage_t = xCAT::Table->new('osimage');
+68 -13
View File
@@ -625,6 +625,18 @@ sub setup_DHCP
my ($nodename) = @_;
my $rc = 0;
my $cmd;
my $snonly = 0;
# read the disjointdhcps attribute to determine if we will setup
# dhcp for all nodes or just for the nodes service by this service node
my $sitetab = xCAT::Table->new('site');
if ($sitetab)
{
my $href;
($href) = $sitetab->getAttribs({key => 'disjointdhcps'}, 'value');
if ($href and $href->{value}) {
$snonly=$href->{value};
}
}
# run makedhcp
my $XCATROOT = "/opt/xcat"; # default
@@ -635,29 +647,66 @@ sub setup_DHCP
}
my $cmdref;
$cmdref->{command}->[0] = "makedhcp";
$cmdref->{arg}->[0] = "-l";
$cmdref->{arg}->[0] = "-n";
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
$cmdref->{arg}->[1] = "-n";
no strict "refs";
my $modname = "dhcp";
${"xCAT_plugin::" . $modname . "::"}{process_request}
->($cmdref, \&xCAT::Client::handle_response);
my $rc = xCAT::Utils->startService("dhcpd");
my $distro = xCAT::Utils->osver();
my $serv = "dhcpd";
if ( $distro =~ /ubuntu*/ ){
$serv = "dhcp3-server";
}
my $rc = xCAT::Utils->startService($serv);
if ($rc != 0)
{
return 1;
}
$cmdref;
$cmdref->{command}->[0] = "makedhcp";
$cmdref->{arg}->[0] = "-l";
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
$cmdref->{arg}->[1] = "-a";
# setup DHCP
#
my $modname = "dhcp";
${"xCAT_plugin::" . $modname . "::"}{process_request}
->($cmdref, \&xCAT::Client::handle_response);
if ($snonly != 1) { # setup dhcp for all nodes
$cmdref;
$cmdref->{command}->[0] = "makedhcp";
$cmdref->{arg}->[0] = "-a";
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
} else { # setup dhcp just for the nodes owned by the SN
# determine my name
# get servicenodes and their nodes
# find the list of nodes serviced
my @hostinfo=xCAT::Utils->determinehostname();
my $sn_hash =xCAT::Utils->getSNandNodes();
my @nodes;
my %iphash=();
my $snkey;
$cmdref;
foreach $snkey (keys %$sn_hash) { # find the service node
if (grep(/$snkey/, @hostinfo)) {
push @nodes, @{$sn_hash->{$snkey}};
$cmdref->{node} = $sn_hash->{$snkey};
$cmdref->{'_xcatdest'} = $snkey;
}
}
if (@nodes) {
my $nodelist;
foreach my $n (@nodes) {
$nodelist .= $n;
$nodelist .= ",";
}
chop $nodelist;
$cmdref->{arg}->[0] = ();
$cmdref->{command}->[0] = "makedhcp";
$cmdref->{noderange}->[0] = "$nodelist";
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
}
}
${"xCAT_plugin::" . $modname . "::"}{process_request}
->($cmdref, \&xCAT::Client::handle_response);
return $rc;
}
@@ -732,8 +781,14 @@ sub setup_DNS
system("$XCATROOT/sbin/makenamed.conf");
# turn DNS on
my $rc = xCAT::Utils->startService("named");
my $distro = xCAT::Utils->osver();
my $serv = "named";
if ( $distro =~ /ubuntu*/ ){
$serv = "bind9";
}
my $rc = xCAT::Utils->startService($serv);
if ($rc != 0)
{
return 1;
+6 -3
View File
@@ -1472,8 +1472,9 @@ sub defmk
else
{
my $rsp;
my $nodenum = scalar(keys %::FINALATTRS);
$rsp->{data}->[0] =
"Object definitions have been created or modified.";
"$nodenum object definitions have been created or modified.";
xCAT::MsgUtils->message("I", $rsp, $::callback);
}
return 0;
@@ -2260,8 +2261,9 @@ sub defch
else
{
my $rsp;
my $nodenum = scalar(keys %::FINALATTRS);
$rsp->{data}->[0] =
"Object definitions have been created or modified.";
"$nodenum object definitions have been created or modified.";
xCAT::MsgUtils->message("I", $rsp, $::callback);
if (scalar(keys %newobjects) > 0)
{
@@ -3448,7 +3450,8 @@ sub defrm
else
{
my $rsp;
$rsp->{data}->[0] = "Object definitions have been removed.";
my $nodenum = scalar(keys %objhash);
$rsp->{data}->[0] = "$nodenum object definitions have been removed.";
xCAT::MsgUtils->message("I", $rsp, $::callback);
}
# Give a warning message to the user to remove the children of the node.
+6 -6
View File
@@ -89,8 +89,8 @@ sub preprocess_request {
}
my ($current_ppc_ent) = $ppctab->getAttribs({ node=>$current_node},@ppcattribs);
my ($fip_ppc_ent) = $ppctab->getAttribs({ node=>$fip_node},@ppcattribs);
my ($current_ppc_ent) = $ppctab->getNodeAttribs($current_node,@ppcattribs);
my ($fip_ppc_ent) = $ppctab->getNodeAttribs($fip_node,@ppcattribs);
my @current_attrs;
my @fip_attrs;
if( $current_ppc_ent->{'parent'} ne $fip_ppc_ent->{'parent'} ) {
@@ -321,8 +321,8 @@ sub swapnodes
return 1;
}
my ($current_ppc_ent) = $ppctab->getAttribs({ node=>$current_node},@ppcattribs);
my ($fip_ppc_ent) = $ppctab->getAttribs({ node=>$fip_node},@ppcattribs);
my ($current_ppc_ent) = $ppctab->getNodeAttribs( $current_node,@ppcattribs);
my ($fip_ppc_ent) = $ppctab->getNodeAttribs( $fip_node,@ppcattribs);
my @current_attrs;
my @fip_attrs;
my $cec;
@@ -407,8 +407,8 @@ sub swapnodes
return 1;
}
my $current_ent = $nodepostab->getAttribs({ node=>$current_node},@nodeposattribs);
my $fip_ent = $nodepostab->getAttribs({ node=>$fip_node},@nodeposattribs);
my $current_ent = $nodepostab->getNodeAttribs( $current_node,@nodeposattribs);
my $fip_ent = $nodepostab->getNodeAttribs( $fip_node,@nodeposattribs);
# swap the current ent and the fip ent
$keyhash{'node'} = $current_node;
File diff suppressed because it is too large Load Diff
+30 -11
View File
@@ -60,6 +60,8 @@ my %distnames = (
"1285192093.430930" => "rhels6", #ppc64
"1305068199.328169" => "rhels6.1", #x86_64
"1305067911.467189" => "rhels6.1", #ppc64
"1321546114.510099" => "rhels6.2", #x86_64
"1321546739.676170" => "rhels6.2", #ppc64
"1285193176.593806" => "rhelhpc6",
"1194015916.783841" => "fedora8",
"1194015385.299901" => "fedora8",
@@ -71,6 +73,7 @@ my %distnames = (
"1257725234.740991" => "fedora12", #x86_64 DVD ISO
"1273712675.937554" => "fedora13", #x86_64 DVD ISO
"1287685820.403779" => "fedora14", #x86_64 DVD ISO
"1305315870.828212" => "fedora15", #x86_64 DVD ISO
"1194512200.047708" => "rhas4.6",
"1194512327.501046" => "rhas4.6",
@@ -179,6 +182,27 @@ sub process_request
}
}
# Check whether the dracut is supported by this os
sub using_dracut
{
my $os = shift;
if ($os =~ /(rhels|rhel)(\d+)/) {
if ($2 >= 6) {
return 1;
}
} elsif ($os =~ /fedora(\d+)/) {
if ($1 >= 12) {
return 1;
}
} elsif ($os =~ /SL(\d+)/) {
if ($1 >= 6) {
return 1;
}
}
return 0;
}
sub mknetboot
{
my $xenstyle=0;
@@ -341,7 +365,6 @@ sub mknetboot
);
}
if ( ! $linuximagetab ) {
$linuximagetab = xCAT::Table->new('linuximage');
}
@@ -360,7 +383,6 @@ sub mknetboot
);
}
}
#print"osvr=$osver, arch=$arch, profile=$profile, imgdir=$rootimgdir\n";
unless ($osver and $arch and $profile)
{
@@ -457,7 +479,6 @@ sub mknetboot
$donetftp{$osver,$arch,$profile} = 1;
}
if ($statelite) {
my $initrdloc = "/$tftpdir/xcat/netboot/$osver/$arch/$profile/";
if ($rootfstype eq "ramdisk") {
@@ -566,9 +587,7 @@ sub mknetboot
}
# special case for redhat6, fedora12/13/14
if ($osver =~ m/rhel6/ || $osver =~ m/rhels6/
|| $osver =~ m/fedora12/ || $osver =~ m/fedora13/
|| $osver =~ m/fedora14/ || $osver =~ m/SL6/) {
if (&using_dracut($osver)) {
$kcmdline = "root=nfs:$nfssrv:$nfsdir/rootimg:ro STATEMNT=";
} else {
$kcmdline = "NFSROOT=$nfssrv:$nfsdir STATEMNT=";
@@ -742,9 +761,7 @@ sub mknetboot
my $initrdstr = "xcat/netboot/$osver/$arch/$profile/initrd-stateless.gz";
$initrdstr = "xcat/netboot/$osver/$arch/$profile/initrd-statelite.gz" if ($statelite);
# special case for the dracut-enabled OSes
if ($osver =~ m/rhels6/ || $osver =~ m/rhel6/
|| $osver =~ m/fedora12/ || $osver =~ m/fedora13/
|| $osver =~ m/fedora14/ || $osver =~ m/SL6/) {
if (&using_dracut($osver)) {
if($statelite and $rootfstype eq "ramdisk") {
$initrdstr = "xcat/netboot/$osver/$arch/$profile/initrd-stateless.gz";
}
@@ -753,7 +770,7 @@ sub mknetboot
if($statelite)
{
my $statelitetb = xCAT::Table->new('statelite');
my $mntopts = $statelitetb->getAttribs({node => $node}, 'mntopts');
my $mntopts = $statelitetb->getNodeAttribs($node, ['mntopts']);
my $mntoptions = $mntopts->{'mntopts'};
unless (defined($mntoptions))
@@ -1053,8 +1070,10 @@ sub mkinstall
) or ( $arch =~ /ppc/
and -r "$pkgdir/ppc/ppc64/vmlinuz"
and $kernpath = "$pkgdir/ppc/ppc64/vmlinuz"
and -r "$pkgdir/ppc/ppc64/ramdisk.image.gz"
and ((-r "$pkgdir/ppc/ppc64/ramdisk.image.gz"
and $initrdpath = "$pkgdir/ppc/ppc64/ramdisk.image.gz")
or (-r "$pkgdir/ppc/ppc64/initrd.img"
and $initrdpath = "$pkgdir/ppc/ppc64/initrd.img")))
)
{
+38 -10
View File
@@ -213,6 +213,8 @@ my $activemm;
my %mpahash;
my $currnode;
my $mpa;
my $mpauser;
my $mpapass;
my $allinchassis=0;
my $curn;
my @cfgtext;
@@ -940,6 +942,18 @@ sub vitals {
my %ledresults=();
my $ledstring="";
if (grep /led/,@vitems) {
$session = new SNMP::Session(
DestHost => $mpa,
Version => '3',
SecName => $mpauser,
AuthProto => 'SHA',
AuthPass => $mpapass,
PrivProto => 'DES',
SecLevel => 'authPriv',
UseNumeric => 1,
Retries => 1, # Give up sooner to make commands go smoother
Timeout=>300000000, #Beacon, for one, takes a bit over a second to return
PrivPass => $mpapass);
my @bindset = (
[$erroroid,$slot],
[$beaconoid,$slot],
@@ -1796,6 +1810,18 @@ sub beacon {
} else {
return (1,"$subcommand unsupported");
}
$session = new SNMP::Session(
DestHost => $mpa,
Version => '3',
SecName => $mpauser,
AuthProto => 'SHA',
AuthPass => $mpapass,
PrivProto => 'DES',
SecLevel => 'authPriv',
UseNumeric => 1,
Retries => 1, # Give up sooner to make commands go smoother
Timeout=>300000000, #Beacon, for one, takes a bit over a second to return
PrivPass => $mpapass);
my $stat = $session->get([$beaconoid.".".$slot]);
if ($session->{ErrorStr}) { return (1,$session->{ErrorStr}); }
if ($stat==0) {
@@ -3177,15 +3203,15 @@ sub getbladecons {
my $ent=$mptabhash->{$node}->[0]; #$mptab->getNodeAttribs($node,['mpa', 'id']);
if (defined($ent->{mpa})) {
$rsp->{node}->[0]->{mm}->[0]=$ent->{mpa};
if (defined($checkedmpas{$ent->{$mpa}}) or not defined $mpatab) {
if (defined($checkedmpas{$ent->{mpa}}) or not defined $mpatab) {
if (defined($mpausers{$ent->{mpa}})) {
$rsp->{node}->[0]->{username}=[$mpausers{$ent->{mpa}}];
} else {
$rsp->{node}->[0]->{username}=[$user];
}
} else {
$checkedmpas{$ent->{$mpa}}=1;
($tmp)=$mpatab->getAttribs({'mpa'=>$mpa},'username');
$checkedmpas{$ent->{mpa}}=1;
($tmp)=$mpatab->getNodeAttribs($ent->{mpa}, ['username']);
if (defined($tmp) and defined $tmp->{username}) {
$mpausers{$ent->{mpa}}=$tmp->{username};
$rsp->{node}->[0]->{username}=[$tmp->{username}];
@@ -3517,7 +3543,7 @@ sub process_request {
my $pass=$bladepass;
my $ent;
if (defined($mpatab)) {
($ent)=$mpatab->getAttribs({'mpa'=>$mpa},'username','password');
($ent)=$mpatab->getNodeAttribs($mpa, ['username','password']);
if (defined($ent->{password})) { $pass = $ent->{password}; }
if (defined($ent->{username})) { $user = $ent->{username}; }
}
@@ -3716,7 +3742,7 @@ sub network {
my $hosttab = xCAT::Table->new( 'hosts' );
if ($hosttab) {
my ($ent) = $hosttab->getAttribs({node=>$mpa},'ip');
my ($ent) = $hosttab->getNodeAttribs($mpa,['ip']);
if (defined($ent)) {
$ip = $ent->{ip};
}
@@ -4166,18 +4192,20 @@ sub dompa {
}
}
$mpauser= $mpahash->{$mpa}->{username};
$mpapass = $mpahash->{$mpa}->{password};
$session = new SNMP::Session(
DestHost => $mpa,
Version => '3',
SecName => $mpahash->{$mpa}->{username},
SecName => $mpauser,
AuthProto => 'SHA',
AuthPass => $mpahash->{$mpa}->{password},
AuthPass => $mpapass,
PrivProto => 'DES',
SecLevel => 'authPriv',
UseNumeric => 1,
Retries => 4, # Give up sooner to make commands go smoother
Timeout=>1500000, #Beacon, for one, takes a bit over a second to return
PrivPass => $mpahash->{$mpa}->{password});
Retries => 1, # Give up sooner to make commands go smoother
Timeout=>3000000, #Beacon, for one, takes a bit over a second to return
PrivPass => $mpapass);
if ($session->{ErrorStr}) {return 1,$session->{ErrorStr}; }
unless ($session and keys %$session) {
my %err=(node=>[]);
+17
View File
@@ -229,6 +229,23 @@ sub docfheaders {
push @newheaders," trusted 127.0.0.1;\n";
my $master=xCAT::Utils->get_site_Master();
push @newheaders, " trusted $master;\n";
# trust all the ip addresses configured on this node
my @allips = xCAT::Utils->gethost_ips();
my @ips = ();
#remove $xcatmaster and duplicate entries
foreach my $ip (@allips) {
if (($ip eq "127.0.0.1") || ($ip eq $master)) {
next;
}
if(!grep(/^$ip$/, @ips)) {
push @ips,$ip;
}
}
if(scalar(@ips) > 0) {
my $ipstr = join(',', @ips);
push @newheaders, " trusted $ipstr;\n";
}
push @newheaders,"}\n";
#push @$content,"#xCAT END ACCESS\n";
+86 -9
View File
@@ -14,9 +14,15 @@ use Fcntl qw/:flock/;
#This is a rewrite of DNS management using nsupdate rather than direct zone mangling
my $callback;
my $service="named";
my $distro = xCAT::Utils->osver();
my $service="named";
# is this ubuntu ?
if ( $distro =~ /ubuntu*/ ){
$service = "bind9";
}
sub handled_commands
{
return {"makedns" => "site:dnshandler"};
@@ -241,6 +247,7 @@ sub process_request {
}
my $resolv="/etc/resolv.conf";
my $found=0;
# check if nameserver site.master in /etc/resolv.conf
my $nameserver=$master->{value};
my $cmd="grep $nameserver $resolv";
my @output=xCAT::Utils->runcmd($cmd, 0);
@@ -258,7 +265,42 @@ sub process_request {
if ($found == 0) { # not nameserver master found
xCAT::SvrUtils::sendmsg([0,"Warning:The management node is not defined as a nameserver in /etc/resolv.conf. Add \"nameserver $nameserver\" to /etc/resolv.conf and run makedns again."], $callback);
}
# chk if search site.domain or domain site.domain on AIX in /etc/resolv.conf
$found=0;
my $domain=$ctx->{domain};
my $cmd="grep $domain $resolv";
my @output=xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
$found=0;
} else { # if it is there check it is a search clause
foreach my $line (@output) {
if ($line =~ /^search/) { # line is a search line
$found=1;
last;
}
# if AIX could be a domain line
if (xCAT::Utils->isAIX()) {
if ($line =~ /^domain/) {
$found=1;
last;
}
}
}
}
if ($found == 0) { # no search site.domain found
xCAT::SvrUtils::sendmsg([0,"Warning:The domain is not defined in a search path or domain path for AIX (in /etc/resolv.conf. Add \"search $domain\" to /etc/resolv.conf and run makedns again."], $callback);
}
# check for selinux disabled
my $rc=xCAT::Utils->isSELINUX();
if ($rc == 0)
{
xCAT::SvrUtils::sendmsg([0,"Warning:SELINUX is not disabled. The makedns command will not be able to generate a complete DNS setup. Disable SELINUX and run the command again."], $callback);
}
my $networkstab = xCAT::Table->new('networks',-create=>0);
unless ($networkstab) { xCAT::SvrUtils::sendmsg([1,'Unable to enumerate networks, try to run makenetworks'], $callback); }
my @networks = $networkstab->getAllAttribs('net','mask','ddnsdomain');
@@ -440,7 +482,7 @@ sub process_request {
}
else
{
system("/sbin/service $service stop"); #named may otherwise hold on to stale journal filehandles
system("service $service stop"); #named may otherwise hold on to stale journal filehandles
}
my $conf = get_conf();
unlink $conf;
@@ -465,8 +507,8 @@ sub process_request {
}
else
{
system("/sbin/service $service stop");
system("/sbin/service $service start");
system("service $service stop");
system("service $service start");
}
xCAT::SvrUtils::sendmsg("Restarting named complete", $callback);
}
@@ -505,7 +547,11 @@ sub get_zonesdir {
sub get_conf {
my $conf="/etc/named.conf";
# is this ubuntu ?
if ( $distro =~ /ubuntu*/ ){
$conf="/etc/bind/named.conf";
}
my $sitetab = xCAT::Table->new('site');
unless ($sitetab)
@@ -550,7 +596,11 @@ sub get_dbdir {
# Temp fix for bugzilla 73119
chown(scalar(getpwnam('root')),scalar(getgrnam('named')),"/var/lib/named");
return "/var/lib/named/";
} else {
}
elsif (-d "/var/lib/bind") {
return "/var/lib/bind/";
}
else {
mkpath "/var/named/";
chown(scalar(getpwnam('named')),scalar(getgrnam('named')),"/var/named");
return "/var/named/";
@@ -827,6 +877,18 @@ sub update_namedconf {
# Toutch the stub zone file
system("/usr/bin/touch $ctx->{dbdir}.'/db.cache'");
$ctx->{restartneeded}=1;
if($ctx->{forwarders})
{
my $dbcachefile = $ctx->{dbdir}.'/db.cache';
my $cmd = qq~dig @"$ctx->{forwarders}[0]" . ns >> $dbcachefile~;
my $outref = xCAT::Utils->runcmd("$cmd", 0);
if ($::RUNCMD_RC != 0)
{
my $rsp = {};
$rsp->{data}->[0] = "Failed to run command: $cmd.\n";
xCAT::MsgUtils->message("W", $rsp, $callback, 1);
}
}
}
}
@@ -876,7 +938,7 @@ sub add_or_delete_records {
@ips = ($ctx->{hoststab}->{$node}->[0]->{ip});
} else {
@ips = getipaddr($node,GetAllAddresses=>1);
unless (@ips) {
if (!defined($ips[0])) {
xCAT::SvrUtils::sendmsg([1,"Unable to find an IP for $node in hosts table or via system lookup (i.e. /etc/hosts"], $callback);
next;
}
@@ -901,8 +963,10 @@ sub add_or_delete_records {
$ctx->{currnode}=$node;
$ctx->{currname}=$name;
$ctx->{currrevname}=$ip;
my $tmpdm;
unless ($domain =~ /\.$/) { $tmpdm = $domain.'.'; } #example.com becomes example.com.
find_nameserver_for_dns($ctx,$revzone);
find_nameserver_for_dns($ctx,$domain);
find_nameserver_for_dns($ctx,$tmpdm);
}
}
my $zone;
@@ -931,6 +995,10 @@ sub add_or_delete_records {
if ($numreqs != 300) { #either no entries at all to begin with or a perfect multiple of 300
$update->sign_tsig("xcat_key",$ctx->{privkey});
my $reply = $resolver->send($update);
if ($reply->header->rcode ne 'NOERROR') {
xCAT::SvrUtils::sendmsg([1,"Failure encountered updating $zone, error was ".$reply->header->rcode], $callback);
}
# sometimes resolver does not work if the update zone request sent so quick
sleep 1;
}
@@ -960,6 +1028,12 @@ sub find_nameserver_for_dns {
}
}
}
if (defined $ctx->{aliases}->{$node}) {
foreach (keys %{$ctx->{aliases}->{$node}}) {
push @rrcontent, "$_ IN CNAME $name";
}
}
if ($ctx->{deletemode}) {
push @rrcontent,"$name TXT";
push @rrcontent,"$name A";
@@ -976,6 +1050,9 @@ sub find_nameserver_for_dns {
} else {
my $reply = $ctx->{resolver}->query($zone,'NS');
if ($reply) {
if ($reply->header->rcode ne 'NOERROR') {
xCAT::SvrUtils::sendmsg([1,"Failure encountered querying $zone, error was ".$reply->header->rcode], $callback);
}
foreach my $record ($reply->answer) {
if ( $record->nsdname =~ /blackhole.*\.iana\.org/) {
$ctx->{nsmap}->{$zone} = 0;
+32 -5
View File
@@ -92,15 +92,41 @@ sub delnode
{
my @macs = split(/\|/, $ent->{mac});
my $mace;
my $count = 0;
foreach $mace (@macs)
{
my $mac;
my $hname;
($mac, $hname) = split(/!/, $mace);
unless ($hname) { $hname = $node; }
unless ($hname)
{
$hname = $node;
} #Default to hostname equal to nodename
unless ($mac) { next; } #Skip corrupt format
if ( !grep /:/,$mac ) {
$mac = lc($mac);
$mac =~ s/(\w{2})/$1:/g;
$mac =~ s/:$//;
}
my $hostname = $hname;
my %client_nethash = xCAT::DBobjUtils->getNetwkInfo( [$node] );
if ( $client_nethash{$node}{mgtifname} =~ /hf/ )
{
if ( scalar(@macs) > 1 ) {
if ( $hname !~ /^(.*)-hf(.*)$/ ) {
$hostname = $hname . "-hf" . $count;
} else {
$hostname = $1 . "-hf" . $count;
}
}
}
$count = $count + 2;
unless ($hostname) { $hostname = $node; }
print $omshell "new host\n";
print $omshell
"set name = \"$hname\"\n"; #Find and destroy conflict name
"set name = \"$hostname\"\n"; #Find and destroy conflict name
print $omshell "open\n";
print $omshell "remove\n";
print $omshell "close\n";
@@ -117,9 +143,9 @@ sub delnode
if ($inetn)
{
my $ip;
if (inet_aton($hname))
if (inet_aton($hostname))
{
$ip = inet_ntoa(inet_aton($hname));
$ip = inet_ntoa(inet_aton($hostname));
}
if ($ip)
{
@@ -883,6 +909,7 @@ sub process_request
}
@dhcpconf = ();
@dhcp6conf = ();
my $dhcplockfd;
open($dhcplockfd,">","/tmp/xcat/dhcplock");
@@ -1052,7 +1079,7 @@ sub process_request
print DBG_FD $syscfg_dhcpd;
close DBG_FD;
} elsif ($_ eq "dhcpd" or $usingipv6) {
$callback->({error=>"The file /etc/sysconfig/$_ doesn't exist, check the dhcp server"});
$callback->({error=>["The file /etc/sysconfig/$_ doesn't exist, check the dhcp server"]});
# return;
}
}
+70 -9
View File
@@ -17,6 +17,7 @@ use POSIX qw(WNOHANG nice);
use File::Path qw/mkpath rmtree/;
use File::Temp qw/tempdir/;
use File::Copy;
use Fcntl qw/:flock/;
use IO::Socket; #Need name resolution
#use Data::Dumper;
Getopt::Long::Configure("bundling");
@@ -46,6 +47,7 @@ my $requester;
my $viavcenter;
my $viavcenterbyhyp;
my $vcenterautojoin=1;
my $datastoreautomount=1;
my $vcenterforceremove=0; #used in rmhypervisor
my $reconfigreset=1;
my $vmwaresdkdetect = eval {
@@ -53,7 +55,21 @@ my $vmwaresdkdetect = eval {
VMware::VIRuntime->import();
1;
};
my %lockhandles;
sub lockbyname {
my $name = shift;
my $lckh;
mkpath("/tmp/xcat/locks/");
while (-e "/tmp/xcat/locks/$name") { sleep 1; }
open($lockhandles{$name},">>","/tmp/xcat/locks/$name");
flock($lockhandles{$name},LOCK_EX);
}
sub unlockbyname {
my $name = shift;
unlink("/tmp/xcat/locks/$name");
close($lockhandles{$name});
}
my %guestidmap = (
"rhel.6.*" => "rhel6_",
@@ -312,6 +328,13 @@ sub process_request {
$vcenterautojoin=0;
}
}
($ref) = $sitetab->getAttribs({key => 'vmwaredatastoreautomount'}, 'value');
if ($ref and defined $ref->{value}) {
$datastoreautomount = $ref->{value};
if ($datastoreautomount =~ /^n/ or $datastoreautomount =~ /^dis/) {
$datastoreautomount=0;
}
}
($ref) = $sitetab->getAttribs({key => 'vmwarereconfigonpower'},'value');
if ($ref and defined $ref->{value}) {
$reconfigreset=$ref->{value};
@@ -2114,7 +2137,7 @@ sub clonevms {
my $masterref;
if ($base) { #if base, we need to pull in the target datastores
my $mastertab=xCAT::Table->new('vmmaster');
$masterref=$mastertab->getAttribs({name=>$base},[qw/storage os arch profile storagemodel nics/]);
$masterref=$mastertab->getNodeAttribs( $base,[qw/storage os arch profile storagemodel nics/]);
unless ($masterref) {
foreach my $node (@$nodes) {
xCAT::SvrUtils::sendmsg([1,"Cannot find master $base in vmmaster table"], $output_handler,$node);
@@ -3553,6 +3576,16 @@ sub refreshclusterdatastoremap {
#a whole cluster instead of chasing one host, a whole lot slower. One would hope vmware would've done this, but they don't
}
sub validate_datastore_prereqs {
my $hyp = $_[1];
lockbyname($hyp.".datastores");
$@="";
my $rc;
eval { $rc=validate_datastore_prereqs_inlock(@_); };
unlockbyname($hyp.".datastores");
if ($@) { die $@; }
return $rc;
}
sub validate_datastore_prereqs_inlock {
my $nodes = shift;
my $hyp = shift;
my $newdatastores = shift; # a hash reference of URLs to afflicted nodes outside of table space
@@ -3618,6 +3651,10 @@ sub validate_datastore_prereqs {
$server = inet_ntoa($servern);
my $uri = "nfs://$server/$path";
unless ($hyphash{$hyp}->{datastoremap}->{$uri}) { #If not already there, must mount it
unless ($datastoreautomount) {
xCAT::SvrUtils::sendmsg([1,": $uri is not currently accessible at the given location and automount is disabled in site table"], $output_handler,$node);
return 0;
}
$refresh_names=1;
($hyphash{$hyp}->{datastoremap}->{$uri},$hyphash{$hyp}->{datastorerefmap}->{$uri})=mount_nfs_datastore($hostview,$location);
$hyphash{$hyp}->{datastoreurlmap}->{$hyphash{$hyp}->{datastoremap}->{$uri}} = $uri;
@@ -3668,6 +3705,10 @@ sub validate_datastore_prereqs {
return 0;
}
unless ($hyphash{$hyp}->{datastoremap}->{$uri}) { #If not already there, must mount it
unless ($datastoreautomount) {
xCAT::SvrUtils::sendmsg([1,":) $uri is not currently accessible at the given location and automount is disabled in site table"], $output_handler,$node);
return 0;
}
$refresh_names=1;
($hyphash{$hyp}->{datastoremap}->{$uri},$hyphash{$hyp}->{datastorerefmap}->{$uri})=mount_nfs_datastore($hostview,$location);
}
@@ -3751,6 +3792,9 @@ sub mount_nfs_datastore {
my $location = shift;
my $server;
my $path;
unless ($datastoreautomount) {
die "automount of VMware datastores is disabled in site configuration, not continuing";
}
($server,$path) = split /\//,$location,2;
$location = getlabel_for_datastore('nfs',$location);
@@ -4214,12 +4258,16 @@ sub mknetboot {
}
unless(
-r "$custprofpath/vmkboot.gz"
or -r "$custprofpath/b.z"
or -r "$installroot/$osver/$arch/mboot.c32"
or -r "$installroot/$osver/$arch/install.tgz" ){
xCAT::SvrUtils::sendmsg([1,"Please run copycds first for $osver or create custom image in $custprofpath/"], $output_handler);
}
my @reqmods = qw/vmkboot.gz vmk.gz sys.vgz cim.vgz/; #Required modules for an image to be considered complete
if ( -r "$custprofpath/b.z" ) { #if someone hand extracts from imagedd, a different name scheme is used
@reqmods = qw/b.z k.z s.z c.z/;
}
my %mods;
foreach (@reqmods) {
$mods{$_} = 1;
@@ -4260,14 +4308,27 @@ sub mknetboot {
}
# now make <HEX> file entry stuff
$kernel = "$tp/mboot.c32";
my $prepend = "$tp/vmkboot.gz";
delete $mods{"vmkboot.gz"};
$append = " --- $tp/vmk.gz";
delete $mods{"vmk.gz"};
$append .= " --- $tp/sys.vgz";
delete $mods{"sys.vgz"};
$append .= " --- $tp/cim.vgz";
delete $mods{"cim.vgz"};
my $prepend;
if ($reqmods[0] eq "vmkboot.gz") {
$prepend = "$tp/vmkboot.gz";
delete $mods{"vmkboot.gz"};
$append = " --- $tp/vmk.gz";
delete $mods{"vmk.gz"};
$append .= " --- $tp/sys.vgz";
delete $mods{"sys.vgz"};
$append .= " --- $tp/cim.vgz";
delete $mods{"cim.vgz"};
} else { #the single letter style
$prepend = "$tp/b.z";
delete $mods{"b.z"};
$append = " --- $tp/k.z";
delete $mods{"k.z"};
$append .= " --- $tp/s.z";
delete $mods{"s.z"};
$append .= " --- $tp/c.z";
delete $mods{"c.z"};
}
if ($mods{"mod.tgz"}) {
$append .= " --- $tp/mod.tgz";
delete $mods{"mod.tgz"};
+2 -2
View File
@@ -125,7 +125,7 @@ sub getfspcon {
#################################
# Get attributes
#################################
my ($att) = $tabs{ppc}->getAttribs({'node'=>$node}, @attribs );
my ($att) = $tabs{ppc}->getNodeAttribs($node, @attribs );
if ( !defined( $att )) {
#return( sprintf( $errmsg{NODE_UNDEF}, "ppc" ));
@@ -206,7 +206,7 @@ sub getmulcon {
#################################
# Get attributes
#################################
my ($att) = $tabs{ppc}->getAttribs({'node'=>$node}, @attribs );
my ($att) = $tabs{ppc}->getNodeAttribs($node, @attribs );
if ( !defined( $att )) {
$rsp->{node}->[0]->{error}=["Node is not defined in ppc table"];
+2 -2
View File
@@ -292,8 +292,8 @@ sub process_request {
# now run the specific genimage command
$callback->({info=>["$cmd"]});
$::CALLBACK=$callback;
#my $output = xCAT::Utils->runcmd("$cmd", 0, 1);
my $output = xCAT::Utils->runcmd_S("$cmd", 0, 1); # stream output
#my $output = xCAT::Utils->runcmd("$cmd", 0, 1); # non-stream
my $output = xCAT::Utils->runcmd("$cmd", 0, 1, 1); # stream output
open(FILE, ">/tmp/genimageoutput");
foreach my $entry (@$output) {
print FILE $entry;
+1 -1
View File
@@ -95,7 +95,7 @@ sub gethmccon {
#################################
# Get attributes
#################################
my ($att) = $tabs{ppc}->getAttribs({'node'=>$node}, @attribs );
my ($att) = $tabs{ppc}->getNodeAttribs( $node, @attribs );
if ( !defined( $att )) {
#return( sprintf( $errmsg{NODE_UNDEF}, "ppc" ));
+1 -2
View File
@@ -590,7 +590,7 @@ sub make_bundle {
if ($rootimgdir) {
$callback->({data=>["Packing root image. It will take a while"]});
system("cd $rootimgdir; find rootimg |cpio -H newc -o | gzip -c - > $tpath/rootimgtree.gz");
$attribs->{'rootimgtree'} = "$rootimgdir/rootimg/rootimgtree.gz";
$attribs->{'rootimgtree'} = "$rootimgdir/rootimgtree.gz";
} else {
$callback->({error=>["Couldn't locate the root image directory. "],errorcode=>[1]});
return 0;
@@ -744,7 +744,6 @@ sub extract_bundle {
# go through each image directory. Find the XML and put it into the array. If there are any
# errors then the whole thing is over and we error and leave.
foreach my $imgdir (@files){
#print "$imgdir \n";
unless(-r "$imgdir/manifest.xml"){
$callback->({error=>["Failed to find manifest.xml file in image bundle"],errorcode=>[1]});
return;
+1 -30
View File
@@ -83,9 +83,6 @@ sub process_request {
$noderange = \@nodenames;
$request->{node} = $noderange;
}
}else{
$callback->({error=>["No node names are given, I cannot figure out who you are."],errorcode=>[1]});
return;
}
my $command = $request->{command}->[0];
@@ -319,33 +316,7 @@ sub getNodeData {
if ($type eq "location")
{
# get locations with specific nodes
push @imageInfo, $tab->getAttribs({node => $node}, @attrs);
if (!defined $imageInfo[0])
{
# maybe node belongs to nodegroup
# try to find it in groups
my @tmpnodes = join(',', $node);
# group info in nodelist tab
my $nltab = xCAT::Table->new('nodelist');
my $nltabdata = $nltab->getNodesAttribs(\@tmpnodes, ['node', 'groups']);
my $data = $nltabdata->{$node}->[0];
my @grps = split(',', $data->{groups});
foreach my $g (@grps)
{
chomp $g;
my $info = $tab->getAttribs({node => $g}, @attrs);
if(defined $info)
{
push @imageInfo, $info;
}
# return once get one record
last if (defined $imageInfo[1]);
}
}
push @imageInfo, $tab->getNodeAttribs($node, @attrs);
}
else
{
+451 -228
View File
@@ -13,6 +13,7 @@ use XML::Simple;
$XML::Simple::PREFERRED_PARSER='XML::Parser';
use xCAT::PPCdb;
use xCAT::NodeRange;
use xCAT::Utils;
require xCAT::MacMap;
require xCAT_plugin::blade;
@@ -144,6 +145,7 @@ my $enter_time = 0;
my @filternodes;
my %otherinterfacehash;
my $TRACE = 0;
my $DEBUG_MATCH = 0;
my %globlehwtype = (
fsp => $::NODETYPE_FSP,
bpa => $::NODETYPE_BPA,
@@ -1392,7 +1394,90 @@ sub getip_from_url {
return( $1 );
}
sub read_from_table {
my %idhash;
my %typehash;
my %iphash;
my %vpdhash;
if ( !defined(%::OLD_DATA_CACHE))
{
# find out all the existed nodes' ipaddresses
my $hoststab = xCAT::Table->new('hosts');
if ( $hoststab ) {
my @ipentries = $hoststab->getAllNodeAttribs( ['node','ip'] );
for my $ipentry ( @ipentries ) {
$iphash{$ipentry->{node}} = $ipentry->{ip};
}
} else {
return 1;
}
#find out all the existed nodes' type
my $nodetypetab = xCAT::Table->new('nodetype');
if ( $nodetypetab ) {
my @typeentries = $nodetypetab->getAllNodeAttribs( ['node','nodetype'] );
for my $typeentry ( @typeentries) {
$typehash{$typeentry->{node}} = $typeentry->{nodetype};
}
} else {
return 2;
}
# find out all the existed nodes' mtms and side
my $vpdtab = xCAT::Table->new( 'vpd' );
if ( $vpdtab ) {
my @vpdentries = $vpdtab->getAllNodeAttribs(['node','mtm','serial','side']);
for my $entry ( @vpdentries ) {
@{$vpdhash{$entry->{node}}}[0] = $entry->{mtm};
@{$vpdhash{$entry->{node}}}[1] = $entry->{serial};
@{$vpdhash{$entry->{node}}}[2] = $entry->{side};
}
} else {
return 3;
}
# find out all the existed nodes' attributes
my $ppctab = xCAT::Table->new('ppc');
if ( $ppctab ) {
my @identries = $ppctab->getAllNodeAttribs( ['node','id','parent','nodetype'] );
for my $entry ( @identries ) {
next if ($entry->{nodetype} =~ /lpar/);
@{$::OLD_DATA_CACHE{$entry->{node}}}[0] = @{$vpdhash{$entry->{node}}}[0];#mtm
@{$::OLD_DATA_CACHE{$entry->{node}}}[1] = @{$vpdhash{$entry->{node}}}[1];#sn
@{$::OLD_DATA_CACHE{$entry->{node}}}[2] = @{$vpdhash{$entry->{node}}}[2];#side
# find node ip address, check node name first, then check hosts table
my $ifip = xCAT::Utils->isIpaddr($entry->{node});
if ( $ifip )
{
@{$::OLD_DATA_CACHE{$entry->{node}}}[3] = $entry->{node};#ip
} else
{
if ( exists ($iphash{$entry->{node}}) ) {
@{$::OLD_DATA_CACHE{$entry->{node}}}[3] = $iphash{$entry->{node}};#ip
}
else {
@{$::OLD_DATA_CACHE{$entry->{node}}}[3] = "";#ip
}
}
@{$::OLD_DATA_CACHE{$entry->{node}}}[4] = $entry->{id};#id
@{$::OLD_DATA_CACHE{$entry->{node}}}[5] = $entry->{parent};#parent
if ( exists $entry->{nodetype}) {
@{$::OLD_DATA_CACHE{$entry->{node}}}[6] = $entry->{nodetype};#nodetype
} else {
if ( exists ($typehash{$entry->{node}}) ) {
@{$::OLD_DATA_CACHE{$entry->{node}}}[6] = $typehash{$entry->{node}};
} else {
@{$::OLD_DATA_CACHE{$entry->{node}}}[6] = "";
}
}
@{$::OLD_DATA_CACHE{$entry->{node}}}[7] = 1;
}
} else
{
return 4;
}
}
return 0;
}
#############################################################################
# Get hostname from SLP URL response and match databse meanwhile
@@ -1414,9 +1499,7 @@ sub gethost_from_url_or_old {
my $parmtm = shift;
my $parsn = shift;
my $pname = shift;
my %idhash = ();
my %iphash = ();
my %typehash = ();
my $flagref = shift;
#######################################
# Extract IP from URL
@@ -1430,113 +1513,14 @@ sub gethost_from_url_or_old {
#}
}
# get the information of existed nodes to do the migration
if ( !defined(%::OLD_DATA_CACHE))
{
# find out all the existed nodes' ipaddresses
my $hoststab = xCAT::Table->new('hosts');
if ( $hoststab )
{
my @ipentries = $hoststab->getAllNodeAttribs( ['node','ip'] );
for my $ipentry ( @ipentries )
{
$iphash{$ipentry->{node}} = $ipentry->{ip};
}
} else
{
# need to do something here
}
# find out all the existed nodes' type
my $nodetypetab = xCAT::Table->new('nodetype');
if ( $nodetypetab )
{
my @typeentries = $nodetypetab->getAllNodeAttribs( ['node','nodetype'] );
for my $typeentry ( @typeentries)
{
$typehash{$typeentry->{node}} = $typeentry->{nodetype};
}
} else
{
# need to do something here
}
# find out all the existed nodes' attributes
my $ppctab = xCAT::Table->new('ppc');
if ( $ppctab )
{
my @identries = $ppctab->getAllNodeAttribs( ['node','id','parent','nodetype'] );
for my $identry ( @identries )
{
if ( $identry->{id} )
{
@{$idhash{$identry->{node}}}[0] = $identry->{id};
}
if ($identry->{parent} )
{
@{$idhash{$identry->{node}}}[1] = $identry->{parent};
}
if ($identry->{nodetype} )
{
@{$idhash{$identry->{node}}}[2] = $identry->{nodetype};
} else
{
@{$idhash{$identry->{node}}}[2] = $typehash{$identry->{node}};
}
}
} else
{
# need to do something here
}
# find out all the existed nodes' mtms and side
my $vpdtab = xCAT::Table->new( 'vpd' );
if ( $vpdtab )
{
my @entries = $vpdtab->getAllNodeAttribs(['node','mtm','serial','side']);
for my $entry ( @entries ) {
if ( $entry->{mtm} and $entry->{serial})
{
@{$::OLD_DATA_CACHE{$entry->{node}}}[0] = $entry->{mtm};
@{$::OLD_DATA_CACHE{$entry->{node}}}[1] = $entry->{serial};
} else {
@{$::OLD_DATA_CACHE{$entry->{node}}}[0] = undef;
@{$::OLD_DATA_CACHE{$entry->{node}}}[1] = undef;
}
@{$::OLD_DATA_CACHE{$entry->{node}}}[2] = $entry->{side};
# find node ip address, check node name first, then check hosts table
my $ifip = xCAT::Utils->isIpaddr($entry->{node});
if ( $ifip )
{
@{$::OLD_DATA_CACHE{$entry->{node}}}[3] = $entry->{node};
} else
{
if ( exists ($iphash{$entry->{node}}) )
{
@{$::OLD_DATA_CACHE{$entry->{node}}}[3] = $iphash{$entry->{node}};
}
else
{
@{$::OLD_DATA_CACHE{$entry->{node}}}[3] = "";
}
}
@{$::OLD_DATA_CACHE{$entry->{node}}}[4] = @{$idhash{$entry->{node}}}[0];
@{$::OLD_DATA_CACHE{$entry->{node}}}[5] = @{$idhash{$entry->{node}}}[1];
@{$::OLD_DATA_CACHE{$entry->{node}}}[6] = @{$idhash{$entry->{node}}}[2];
@{$::OLD_DATA_CACHE{$entry->{node}}}[7] = 1;
}
}
else
{
# need to do something here
}
}
if (($type eq TYPE_BPA or $type eq TYPE_FSP) and $pname)
{
$enter_time = ($enter_time + 1) % 2;
}
read_from_table() unless (%::OLD_DATA_CACHE);
foreach my $oldnode ( keys %::OLD_DATA_CACHE )
{
@@ -1553,6 +1537,8 @@ sub gethost_from_url_or_old {
# should return fast to save time
if (($type eq TYPE_BPA or $type eq TYPE_FSP) and ($tmptype eq $type) and $pname and $side) {
if ($pname eq $tmpparent and $side eq $tmpside) {
$$flagref = 1;
print "1 got old name $oldnode \n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
@@ -1569,6 +1555,8 @@ sub gethost_from_url_or_old {
if ( $tmpside eq $side ) {# match! which means that node is the same as the new one
if ( $ip eq $tmpip ) { #which means that the ip is not changed
# maybe we should check if the ip is invalid and send a warning
$$flagref = 1;
print "2 got old name $ip\n" if($DEBUG_MATCH eq 1);
return $ip;
} else { #which means that the ip is changed
my $vip = check_ip($ip);
@@ -1576,6 +1564,8 @@ sub gethost_from_url_or_old {
# maybe we should check if the old ip is invalid and send a warning
# even so we should keep the definition as before
# because this case, we can't put check_ip in the end
$$flagref = 1;
print "3 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
} else {
return $ip;
@@ -1592,24 +1582,34 @@ sub gethost_from_url_or_old {
if ( $ip eq $tmpip ) {
if ( $oldnode =~ /\-(A|B)$/) {
@{$::OLD_DATA_CACHE{$oldnode}}[7] = 0;
$$flagref = 1;
print "4 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
} else {
@{$::OLD_DATA_CACHE{$oldnode}}[7] = 0;
#change node name, need to record the node here
$::UPDATE_CACHE{$mtm.'-'.$sn} = $oldnode;
$$flagref = 1;
print "5 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode.'-'.$slot;
}
} else {# not find a matched definition, but need to use the old node name
if ( $enter_time eq 0 and $unmatched){
$$flagref = 1;
print "6 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
} elsif ( $tmpside =~ /\-/ ) {# end of if ( $oldnode =~ /^Server\-/)
if ( $ip eq $tmpip ) {
@{$::OLD_DATA_CACHE{$oldnode}}[7] = 0;
$$flagref = 1;
print "7 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
} else{
if ( $enter_time eq 0 and $unmatched){
$$flagref = 1;
print "8 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
@@ -1617,25 +1617,32 @@ sub gethost_from_url_or_old {
}
} elsif ( $tmpside =~ /\-/ ){
if ( $side eq $tmpside ) {
$$flagref = 1;
print "9 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
} elsif ( !$tmpside ) {
if ( $oldnode =~ /^Server\-/) {#judge if need to change node's name
if ( $oldnode !~ /\-(A|B)$/ ) {
delete $::OLD_DATA_CACHE{$oldnode};
$$flagref = 1;
print "10 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode."-".$slot;
}
}
# if mtms could match but side not defined, we will trate
# it as the result by rscan. And alway use its name.
delete $::OLD_DATA_CACHE{$oldnode};
$$flagref = 1;
print "11 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
}# end of if ($tmpmtm eq $mtm and $tmpsn eq $sn)
} elsif ( ($type eq TYPE_FRAME or $type eq TYPE_CEC) and ($type eq $tmptype)){
}
if ( ($type eq TYPE_FRAME or $type eq TYPE_CEC) and ($type eq $tmptype)){
if ( !$tmpmtm and !$tmpid) {
next;
}
@@ -1645,6 +1652,8 @@ sub gethost_from_url_or_old {
my $tpparmtm = @{$::OLD_DATA_CACHE{$tmpparent}}[0];
my $tpparsn = @{$::OLD_DATA_CACHE{$tmpparent}}[1];
if ( ($tpparmtm eq $parmtm) and ($tpparsn eq $parsn) and ($cage_number eq $tmpid) and ($type eq $tmptype) ) {
$$flagref = 1;
print "12 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
@@ -1656,12 +1665,18 @@ sub gethost_from_url_or_old {
if ( $oldnode =~ /(\-A)$/) {
$nodename = s/(\-A)$//;
# should send a warning here
$$flagref = 1;
print "13 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $nodename;
}
else {
$$flagref = 1;
print "14 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
} else {
$$flagref = 1;
print "15 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
@@ -1922,7 +1937,7 @@ sub getip_from_iplist
{
my $flag = 1;
for my $einc (@ips2) {
if ( $nets->{$net} eq $einc) {
if ( $nets->{$net} eq $einc) {
$flag = 0;
}
}
@@ -2075,8 +2090,26 @@ sub parse_responses {
my $request = shift;
my $values = shift;
my $length = shift;
my %outhash = ();
my $matchflag = 0;
my %outhash;
my %net;
my %addr;
my $nettab = xCAT::Table->new('networks');
my @nets = $nettab->getAllAttribs('netname', 'net','mask','mgtifname');
if (scalar(@nets) == 0) {
trace( $request, "Can't get networks information from networks table" , 1);
} else {
foreach my $enet (@nets) {
next if ($enet->{'net'} =~ /:/);
$net{$enet->{'mgtifname'}}{subnet} = $enet->{'net'};
$net{$enet->{'mgtifname'}}{netmask} = $enet->{'mask'};
}
}
my $netref = xCAT::NetworkUtils->get_nic_ip();
for my $entry (keys %$netref) {
$addr{$netref->{$entry}}{subnet} = $net{$entry}{subnet};
$addr{$netref->{$entry}}{netmask} = $net{$entry}{netmask};
}
my @attrs = (
"type",
"machinetype-model",
@@ -2101,7 +2134,9 @@ sub parse_responses {
my %fid1;
my %fid2;
my %cid;
my %pmtm;
my %psn;
my @matchnodes;
trace( $request, "Now I will explain how the lsslp parse its response: " , 1);
foreach my $rsp ( @$values ) {
###########################################
@@ -2171,7 +2206,7 @@ sub parse_responses {
# $hostip{$entry->{node}} = $entry->{ip};
#}
trace( $request, "The type is $result[0], mtm is $result[1], sn is $result[2], side is $result[3], ip is $result[4], parent mtm is $result[5], parent sn is $result[6], frame num is $result[7], cage num is $result[8].", 1 );
trace( $request, ">>>>>>>>The type is $result[0], mtm is $result[1], sn is $result[2], side is $result[3], ip is $result[4], parent mtm is $result[5], parent sn is $result[6], frame num is $result[7], cage num is $result[8].", 1 );
# begin to define FSP/BPA/FRAME/CEC
my $typetp;
@@ -2185,9 +2220,7 @@ sub parse_responses {
}
my $hostname = undef;
if ( $type eq SERVICE_BPA or $type eq SERVICE_FSP ) {
trace( $request, "........First begin to define FSP/BPA nodes", 1 );
trace( $request, " we will keep the datas here first", 1);
trace( $request, "........First define FSP/BPA nodes", 1 );
###########################################
# begin to define fsp/bpa, use ip as the hostname of the fsp/bpa
# for there are redundancy of fsp/bpa,
@@ -2199,36 +2232,46 @@ sub parse_responses {
my (@severnode1, @severnode2);
my @ips = split/,/, $result[4];
#keep cage id for the secondary fsp definition
#the cash hash is like $fid{mtm*sn}=cageid
#if ($type eq SERVICE_FSP and $severnode1[3] eq "A")
#{
# $fid1{$severnode1[1]."*".$severnode1[2]} = $severnode1[8];
#}
#if ($type eq SERVICE_FSP and $severnode1[3] eq "B")
#{
# $fid2{$severnode1[1]."*".$severnode1[2]} = $severnode1[8];
#}
if (!exists($cid{$result[1]."*".$result[2]} ) || ($result[8] > 0)) {
$cid{$result[1]."*".$result[2]} = $result[8];
}
if (!exists($pmtm{$result[1]."*".$result[2]}) || ($result[5] > 0)) {
$pmtm{$result[1]."*".$result[2]} = $result[5];
$psn{$result[1]."*".$result[2]} = $result[6];
}
foreach (@result) {
push @severnode1, $_;
}
#keep cage id for the secondary fsp definition
#the cash hash is like $fid{mtm*sn}=cageid
if ($type eq SERVICE_FSP and $severnode1[3] eq "A")
{
$fid1{$severnode1[1]."*".$severnode1[2]} = $severnode1[8];
}
if ($type eq SERVICE_FSP and $severnode1[3] eq "B")
{
$fid2{$severnode1[1]."*".$severnode1[2]} = $severnode1[8];
}
$severnode1[3] = $severnode1[3].'-0';
$severnode1[4] = $ips[0];
$severnode1[0] = $typetp;
push @severnode1, $rsp;
$matchflag = 0;
$hostname = gethost_from_url_or_old($ips[0], $severnode1[0], $severnode1[1], $severnode1[2],
$severnode1[3], $ips[0], $severnode1[8], $severnode1[5],$severnode1[6]);
if ( $hostname )
{
$severnode1[3], $ips[0], $severnode1[8], $severnode1[5],$severnode1[6], undef, \$matchflag);
trace( $request, " The node $ips[0] match the old data and got the new name $hostname, $matchflag" , 1);
if ( $hostname ) {
$outhash{$hostname} = \@severnode1;
}
push @matchnodes, $hostname if ($matchflag eq 1) ;
if ( length( $severnode1[4] ) > $$length ) {
$$length = length( $severnode1[4] );
}
}
trace( $request, " The node $ips[0] match the old data and got the new name $hostname" , 1);
#begin to define another fsp/bpa
$hostname = undef;
foreach (@result) {
@@ -2238,24 +2281,24 @@ sub parse_responses {
$severnode2[4] = $ips[1];
$severnode2[0] = $typetp;
push @severnode2, $rsp;
$matchflag = 0;
$hostname = gethost_from_url_or_old($ips[1], $severnode2[0], $severnode2[1], $severnode2[2],
$severnode2[3], $ips[1], $severnode2[8], $severnode2[5],$severnode2[6]);
if ( $hostname )
{
$severnode2[3], $ips[1], $severnode2[8], $severnode2[5],$severnode2[6], undef, \$matchflag);
trace( $request, " The node $ips[1] match the old data and got the new name $hostname, $matchflag" , 1);
if ( $hostname ) {
$outhash{$hostname} = \@severnode2;
}
push @matchnodes, $hostname if ($matchflag eq 1) ;
if ( length( $severnode2[4] ) > $$length ) {
$$length = length( $severnode2[4] );
}
trace( $request, " The node $ips[1] match the old data and got the new name $hostname" , 1);
}
###########################################
# begin to define frame and cec
# As default, use Server-$result[1]-SN$result[2] as hostname
# put the definitions into %outhash
###########################################
trace( $request, "........second begin to define frame and cec " , 1);
trace( $request, "......Second define frame and cec " , 1);
$hostname = undef;
$host = "Server-$result[1]-SN$result[2]";
unless ( exists( $outhash{$host} ))
@@ -2273,13 +2316,15 @@ sub parse_responses {
# side of frame and cec should be null
$result[4] = "";
push @result, $rsp;
$matchflag = 0;
$hostname = gethost_from_url_or_old($host, $result[0], $result[1], $result[2],
$result[3],$result[4], $result[8],$result[5],$result[6]);
if ( $hostname )
{
$result[3],$result[4], $result[8],$result[5],$result[6], undef, \$matchflag);
trace( $request, " The node $host match the old data and got the new name $hostname, $matchflag" , 1);
if ( $hostname ) {
$outhash{$hostname} = \@result;
push @matchnodes, $hostname if ($matchflag eq 1);
}
trace( $request, " the node $host match the old data and got the new name $hostname " , 1);
}
} else {
@@ -2287,25 +2332,55 @@ sub parse_responses {
###########################################
# for HMC
###########################################
trace( $request, "........begin to define hmc ", 1);
$host = gethost_from_url( $request, $rsp, @result);
trace( $request, "......Begin to define hmc ", 1);
$matchflag = 0;
$host = gethost_from_url( $request, $rsp, @result, \$matchflag);
trace( $request, " The node $host match the old data and got the new name $host, $matchflag" , 1);
if ( !defined( $host )) {
next;
}
push @matchnodes, $host if ($matchflag eq 1) ;
###########################################
# Strip commas from IP list
# Find IP for HMC
# 1. If it can match the definintion made by
# xcatsetup, just return the ip matched
# 2. If there is -i flag, return the ip that
# within the same subnet with opt{i}
# 3. If no match and no flag -i, return first
###########################################
# we need to hide ipv6 ip address temporarily
my @iptmp = split /,/, $result[4];
my @iptmp2;
foreach (@iptmp){
if ($_ =~ /\d+\.\d+\.\d+\.\d+/) {
push @iptmp2,$_;
my $matchhmc = 0;
foreach my $ii (@iptmp){
if ($ii =~ /\d+\.\d+\.\d+\.\d+/) {
$matchflag = 1;
my $newhost = match_ip_defined_by_xcatsetup($ii, \$matchflag);
push @matchnodes, $host if ($matchflag eq 1) ;
if ($newhost) {
$host = $newhost;
$matchhmc = 1;
$result[4] = $ii;
} elsif (exists($opt{i})){
my @userip = split /,/, $opt{i};
foreach my $uip (@userip) {
my $subnet = $addr{$uip}{subnet};
my $netmask = $addr{$uip}{netmask};
if(xCAT::NetworkUtils->ishostinsubnet($ii, $netmask, $subnet)) {
$matchhmc = 1;
$result[4] = $ii;
next;
}
}
}
push @iptmp2,$ii;
}
}
$result[4] = join( ",", @iptmp2);
unless($matchhmc) {
#$result[4] = join( ",", @iptmp2);
$result[4] = $iptmp2[0];
}
# end of hidden ipv6 ip address
@@ -2330,31 +2405,30 @@ sub parse_responses {
############################################################
# find out the cageid for the cec
############################################################
trace( $request, "\n\n.......the cageid need to be adjust,because some secondary fsp return wrong side value ( always 0)", 1);
foreach my $idtmp( keys(%fid1) )
{
if ($fid1{$idtmp} > 0)
{
$cid{$idtmp} = $fid1{$idtmp};
} elsif ($fid2{$idtmp} > 0)
{
$cid{$idtmp} = $fid2{$idtmp};
} else {
$cid{$idtmp} = 0;
}
}
foreach ( keys(%fid2) )
{
if (!defined($cid{$_}))
{
$cid{$_} = $fid2{$_};
}
}
#trace( $request, "\n\nThe cageid need to be adjust,because some secondary fsp return wrong side value ( always 0)", 1);
#foreach my $idtmp( keys(%fid1) )
#{
# if ($fid1{$idtmp} > 0)
# {
# $cid{$idtmp} = $fid1{$idtmp};
# } elsif ($fid2{$idtmp} > 0)
# {
# $cid{$idtmp} = $fid2{$idtmp};
# } else {
# $cid{$idtmp} = 0;
# }
#}
#foreach ( keys(%fid2) )
#{
# if (!defined($cid{$_}))
# {
# $cid{$_} = $fid2{$_};
# }
#}
############################################################
# -n flag to skip the existing node
############################################################
trace( $request, "\n\ncheck if there is -n, and skip the existing nodes ", 1);
my %vpd_table_hash;
my $vpdtab = xCAT::Table->new( 'vpd' );
my @entries = $vpdtab->getAllNodeAttribs(['node','mtm','serial','side']);
@@ -2364,23 +2438,16 @@ sub parse_responses {
}
}
my %nodehm_table_hash;
my $nodehm_tab = xCAT::Table->new('nodehm');
my @nodehm_entries = $nodehm_tab->getAllNodeAttribs(['node','mgt']);
for my $entry ( @nodehm_entries ) {
if ( $entry->{'mgt'} ) {
$nodehm_table_hash{$entry->{'node'}} = $entry->{ 'mgt'};
}
}
##########################################################
# Find the parent and mac and set them as the 10th and 11th
# of the attribute of the server nodes
##########################################################
my %hash = ();
my %hash;
my $mac;
my $parent;
trace( $request, "\n\n\n Begin to parse these datas second time: ", 1);
my $newhostname;
trace( $request, "\n\n\nBegin to find cec's id, parent and hostname, find frame's hostname", 1);
foreach my $h ( keys %outhash ) {
my $data = $outhash{$h};
my $type = @$data[0];
@@ -2396,34 +2463,42 @@ sub parse_responses {
my $bpamtm = @$data[5];
my $bpasn = @$data[6];
my $cagenum = @$data[8];
trace( $request, ">>>>>>>>The node is $h, type is $type, mtm is $mtm, sn is $sn, side is $side, ip is $ip0, bpamtm is $bpamtm, bpasn is $bpasn, cagenum is $cagenum", 1);
trace( $request, "......The node is $h, type is $type, mtm is $mtm, sn is $sn, side is $side, ip is $ip0, bpamtm is $bpamtm, bpasn is $bpasn, cagenum is $cagenum", 1);
# find cageid for the secondary fsp node
if ( $type =~ /^FSP$/ || $type =~ /^CEC$/) {
@$data[8] = $cid{$mtm."*".$sn};
@$data[5] = $pmtm{$mtm."*".$sn};
@$data[6] = $psn{$mtm."*".$sn};
$bpamtm = @$data[5];
$bpasn = @$data[6];
$cagenum = @$data[8];
trace ( $request, " Adjust cageid to @$data[8], bpamtm to @$data[5], bpasn to @$data[6]", 1);
}
# if there is a -n flag, skip the existed nodes
if ( exists( $opt{n} ) ) {
if ( exists $vpd_table_hash{$mtm . '*' . $sn . '-' . $side} ) {
my $existing_node = $vpd_table_hash{$mtm . '*' . $sn . '-' . $side};
if ( exists $nodehm_table_hash{$existing_node} ) {
trace ( $request, " This node is exites, so skipped. ", 1);
next;
if ($type =~ /^HMC$/) {
$matchflag = 0;
$newhostname = match_hosts_defined_by_xcatsetup($h, $type, $mtm, $sn, $side, $ip0, $cagenum, $bpamtm, $bpasn, $parent, \$matchflag);
if ($newhostname) {
$hash{$newhostname} = $data;
push @matchnodes, $newhostname;
} else {
$hash{$h} = $data;
}
trace ( $request, " HMC $h macth the data defined by xcatsetup and got name $newhostname", 1);
}
}
# begin to find parent
next unless( $type eq TYPE_CEC or $type eq TYPE_FRAME );
my $newname;
foreach my $h1 ( keys %outhash ) {
my $data1 = $outhash{$h1};
my $type1 = @$data1[0];
my $mtm1 = @$data1[1];
my $sn1 = @$data1[2];
if ( $type1 eq TYPE_FRAME and ($type eq TYPE_BPA or $type eq TYPE_CEC) and $mtm1 eq $bpamtm and $sn1 eq $bpasn ) {
$parent = $h1; # BPA and CEC's parent is Frame
last;
} elsif ( $type1 eq TYPE_CEC and $type eq TYPE_FSP and $mtm1 eq $mtm and $sn1 eq $sn ) {
$parent = $h1; # FSP's parent is CEC
if ($mtm1 eq $bpamtm and $sn1 eq $bpasn and $type1 eq "frame") {
$parent = $h1; # CEC's parent is Frame
last;
} else {
$parent = undef; # Frame and HMC have no parent
@@ -2443,41 +2518,108 @@ sub parse_responses {
}
push @$data, $parent;
trace ( $request, " Then find the node's parent $parent.", 1);
push @$data, undef; #This is for $data[9], which is mac address;
trace ( $request, " $h find the parent $parent.", 1);
##########################################################
#find the mac address
if ( $type ne TYPE_FRAME and $type ne TYPE_CEC ) {# the ips of frame and cec are null
$mac = match_ip_mac( $ip0 );
##########################################################
$newhostname = match_hosts_defined_by_xcatsetup($h, $type, $mtm, $sn, $side, $ip0, $cagenum, $bpamtm, $bpasn, $parent, \$matchflag);
if ($newhostname) {
$hash{$newhostname} = $data;
push @matchnodes, $newhostname;
} else {
$mac = undef;
}
# This is originally used to check the invalid mac address in AIX, but failed to do it.
#unless ( $mac =~ /\w+\:\w+\:\w+\:\w+\:\w+\:\w+/ ) { $mac = undef;}
push @$data, $mac;
trace ( $request, " Then find the node's mac $mac.", 1);
# have got node's parent and id, need to match fsp here
trace ( $request, " Need to find new name for the fsp/bpa with parent $parent and id @$data[8].", 1);
if (($type eq TYPE_FSP or $type eq TYPE_BPA) and $parent)
{
$newname = gethost_from_url_or_old($h, $type, undef, undef, $side, undef, undef, undef, undef, $parent);
}
if ($newname)
{
trace ( $request, " The new name is $newname.", 1);
$hash{$newname} = $data;
$otherinterfacehash{$newname}{otherinterfaces} = $ip0;
trace( $request, " Keep the node ip $ip0 in its otherinterfaces" , 1);
}
else
{
trace ( $request, " The new name is $h.", 1);
$hash{$h} = $data;
$otherinterfacehash{$h}{otherinterfaces} = $ip0;
trace( $request, " Keep the node ip $ip0 in its otherinterfaces" , 1);
}
trace ( $request, " CEC $h macth the data defined by xcatsetup and got name $newhostname", 1);
}
##########################################################
# Find the parent,hostname and mac address for fsp/bpa
# Find mac address for HMC
##########################################################
trace( $request, "\n\n\nBegin to find parent and hostname for fsp/bpa: ", 1);
foreach my $h ( keys %outhash ) {
my $data = $outhash{$h};
my $type = @$data[0];
my $mtm = @$data[1];
my $sn = @$data[2];
my $side = @$data[3];
my $ip0;
if ( $h =~ /^([^\(]+)\(([^\)]+)\)$/ ) {
$ip0 = $2;
} else {
$ip0 = @$data[4];
}
my $bpamtm = @$data[5];
my $bpasn = @$data[6];
my $cagenum = @$data[8];
trace( $request, "......The node is $h", 1);
##########################################################
# begin to find fsp/bpa's parent
##########################################################
if ( $type eq TYPE_BPA or $type eq TYPE_FSP) {
foreach my $h1 ( keys %hash ) {
my $data1 = $hash{$h1};
my $type1 = @$data1[0];
my $mtm1 = @$data1[1];
my $sn1 = @$data1[2];
if ((( $type1 eq TYPE_FRAME and $type eq TYPE_BPA) or ($type1 eq TYPE_CEC and $type eq TYPE_FSP)) and ($mtm1 eq $mtm and $sn1 eq $sn) ) {
$parent = $h1; # FSP's parent is CEC
last;
} else {
$parent = undef; # HMC have no parent
}
}
push @$data, $parent; #This is for $data[8];
trace ( $request, " Find the $h parent $parent.", 1);
} else {
push @$data, undef;
}
##########################################################
# match fsp/bpa nodes with the definition made by xcatsetup
# keep the otherinterfaces for the nodes.
##########################################################
if ( $type eq TYPE_BPA or $type eq TYPE_FSP) {
$newhostname = match_hosts_defined_by_xcatsetup($h, $type, $mtm, $sn, $side, $ip0, $cagenum, $bpamtm, $bpasn, $parent);
if ($newhostname) {
trace ( $request, " Find the new hostname $newhostname.", 1);
$hash{$newhostname} = $data;
push @matchnodes, $newhostname;
$otherinterfacehash{$newhostname}{otherinterfaces} = $ip0;
trace( $request, " Keep the node ip $ip0 in $newhostname otherinterfaces" , 1);
} else {
$hash{$h} = $data;
$otherinterfacehash{$h}{otherinterfaces} = $ip0;
trace( $request, " Keep the node ip $ip0 in $h otherinterfaces" , 1);
}
}
##########################################################
# find the mac address for the fsp/bpa/hmc nodes.
##########################################################
if ( $type eq TYPE_BPA or $type eq TYPE_FSP or $type eq TYPE_HMC) {
$mac = match_ip_mac( $ip0 );
# This is originally used to check the invalid mac address in AIX, but failed to do it.
#unless ( $mac =~ /\w+\:\w+\:\w+\:\w+\:\w+\:\w+/ ) { $mac = undef;}
push @$data, $mac; #This is for $data[9], which is mac address;
trace ( $request, " Find the $h mac $mac.", 1);
} else {
push @$data, undef;
}
}
##########################################################
# If there is -n flag, skip the matched nodes
##########################################################
if (exists($opt{n})) {
trace( $request, "\n\n\nThere is -n flag, skip these nodes:\n", 1);
for my $matchednode (@matchnodes) {
if ($hash{$matchednode}) {
trace( $request, "$matchednode,", 1);
delete $hash{$matchednode};
}
}
}
@@ -2579,7 +2721,7 @@ sub xCATdB {
########################################
# HMC: name=hostname, ip=ip, mac=mac
########################################
xCAT::PPCdb::add_ppchcp( lc($type), "$name,$mac,$ip",1 );
xCAT::PPCdb::add_ppchcp( lc($type), "$name,$mac,$model,$serial,$ip",1 );
}
elsif ( $type =~ /^FSP$/ ) {
########################################
@@ -3711,7 +3853,8 @@ sub get_rsp_dev
#############################################
my $passtab = xCAT::Table->new('passwd');
if ( $passtab ) {
my ($ent) = $passtab->getAttribs({key=>'blade'},'username','password');
#my ($ent) = $passtab->getAttribs({key=>'blade'},'username','password');
my $ent = $passtab->getNodeAttribs('blade', ['username','password']);
if ( defined( $ent )) {
$bladeuser = $ent->{username};
$bladepass = $ent->{password};
@@ -3721,17 +3864,18 @@ sub get_rsp_dev
# Get MM userid/password
#############################################
my $mpatab = xCAT::Table->new('mpa');
foreach ( keys %$mm ) {
for my $nd ( keys %$mm ) {
my $user = $bladeuser;
my $pass = $bladepass;
if ( defined( $mpatab )) {
my ($ent) = $mpatab->getAttribs({mpa=>$_},'username','password');
#my ($ent) = $mpatab->getAttribs({mpa=>$_},'username','password');
my $ent = $mpatab->getNodeAttribs($nd, ['username','password']);
if ( defined( $ent->{password} )) { $pass = $ent->{password}; }
if ( defined( $ent->{username} )) { $user = $ent->{username}; }
}
$mm->{$_}->{username} = $user;
$mm->{$_}->{password} = $pass;
$mm->{$nd}->{username} = $user;
$mm->{$nd}->{password} = $pass;
}
}
if (%$hmc )
@@ -3909,7 +4053,7 @@ sub filtersamevlan {
$validnets->{$net} = $nic;
}
}
}
}
foreach my $name ( keys %$oldhash ) {
my @data = @{ $oldhash->{$name}};
my $type = lc($data[0]);
@@ -3927,6 +4071,85 @@ sub filtersamevlan {
}
return $newhash;
}
##########################################################################
# Match the nodes defined by xcatsetup
# The match rules are:
# match Frame nodes with mtms
# match CEC nodes with parent name and id
# match FSP/BPA nodes with parent name and side
##########################################################################
sub match_hosts_defined_by_xcatsetup {
my $nodename = shift;
my $type = shift;
my $mtm = shift;
my $sn = shift;
my $side = shift;
my $ip = shift;
my $cage_number = shift;
my $parmtm = shift;
my $parsn = shift;
my $pname = shift;
my $flagref = shift;
read_from_table() unless (%::OLD_DATA_CACHE);
foreach my $oldnode ( keys %::OLD_DATA_CACHE )
{
my $tmpmtm = @{$::OLD_DATA_CACHE{$oldnode}}[0];
my $tmpsn = @{$::OLD_DATA_CACHE{$oldnode}}[1];
my $tmpside = @{$::OLD_DATA_CACHE{$oldnode}}[2];
my $tmpip = @{$::OLD_DATA_CACHE{$oldnode}}[3];
my $tmpid = @{$::OLD_DATA_CACHE{$oldnode}}[4];
my $tmpparent = @{$::OLD_DATA_CACHE{$oldnode}}[5];
my $tmptype = uc(@{$::OLD_DATA_CACHE{$oldnode}}[6]);
my $unmatched = @{$::OLD_DATA_CACHE{$oldnode}}[7];
if ($type eq TYPE_FRAME)
{
if ($tmpmtm eq $mtm and $tmpsn eq $sn and $type eq $tmptype) {
$$flagref = 1;
print "20 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
if ($type eq TYPE_CEC)
{
if ($pname eq $tmpparent and $cage_number eq $tmpid and $type eq $tmptype) {
$$flagref = 1;
print "21 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
if ($type eq TYPE_BPA or $type eq TYPE_FSP)
{
if ($pname eq $tmpparent and $side eq $tmpside and $type eq $tmptype) {
$$flagref = 1;
print "22 got old name $oldnode\n" if($DEBUG_MATCH eq 1);
return $oldnode;
}
}
}
return undef;
}
##########################################################################
# Match the nodes defined by xcatsetup
# Use ip to find HMC defined by the user
##########################################################################
sub match_ip_defined_by_xcatsetup {
my $ip = shift;
my $matchflag = shift;
read_from_table() unless (%::OLD_DATA_CACHE);
foreach my $oldnode ( keys %::OLD_DATA_CACHE ) {
my $tmpip = @{$::OLD_DATA_CACHE{$oldnode}}[3];
my $tmptype = uc(@{$::OLD_DATA_CACHE{$oldnode}}[6]);
next unless($tmptype eq TYPE_HMC);
if ($ip eq $tmpip) {
$$matchflag = 1;
return $oldnode;
}
}
return undef;
}
1;
@@ -248,7 +248,7 @@ sub add_known_host
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
return 1;
}
chop($ip_address);
chomp($ip_address);
if (defined $hostname)
{
+10 -6
View File
@@ -1111,12 +1111,16 @@ sub process_request {
while ($newappstatus =~ /(\w+)\=(\w+)/) {
my $tmp1=$1;
my $tmp2=$2;
if($oldappstatus =~ /$tmp1\=/){
$oldappstatus =~ s/$tmp1\=\w+/$tmp1\=$tmp2/g;
}else{
$oldappstatus = $oldappstatus."\,$tmp1\=$tmp2";
}
$newappstatus =~ s/(\w+)\=(\w+)//g;
if ($oldappstatus) {
if($oldappstatus =~ /$tmp1\=/){
$oldappstatus =~ s/$tmp1\=\w+/$tmp1\=$tmp2/g;
}else{
$oldappstatus = $oldappstatus."\,$tmp1\=$tmp2";
}
} else {
$oldappstatus = "$tmp1\=$tmp2";
}
$newappstatus =~ s/(\w+)\=(\w+)//;
}
$status1->{$node1}->{appstatus}= $oldappstatus;
$status1->{$node1}->{appstatustime}= $currtime;
+36 -11
View File
@@ -107,9 +107,14 @@ sub preprocess_request {
# get sent up to the MN
my $req = shift;
unless ( defined( $req->{_xcatdest} ) ) {
$req->{_xcatdest} = xCAT::Utils->get_site_Master();
#if already preprocessed, go straight to request
if ( (defined($req->{_xcatpreprocessed}))
&& ($req->{_xcatpreprocessed}->[0] == 1))
{
return [$req];
}
$req->{_xcatdest} = xCAT::Utils->get_site_Master();
return [$req];
}
@@ -842,6 +847,9 @@ sub ll_jobs {
if (defined($::FILEATTRS{newfeature}[0])){
push (@ugdflines, "newfeature=$::FILEATTRS{newfeature}[0]\n");
}
if (defined($::FILEATTRS{reconfiglist}[0])){
push (@ugdflines, "reconfiglist=$::FILEATTRS{reconfiglist}[0]\n");
}
push (@ugdflines, "\n");
push (@ugdflines, &get_prescripts($nodelist));
if (defined($::FILEATTRS{shutdowntimeout}[0])){
@@ -1856,6 +1864,11 @@ mxnode_loop: foreach my $mxnode ( xCAT::NodeRange::noderange($mxnodegroup) ) {
sub runrollupdate {
my $reboot_request = shift;
if ( ! $reboot_request->{arg} ) {
&runrollupdate_usage;
return;
}
my @reboot_args = @{$reboot_request->{arg}};
my $internal = 0;
if ( $reboot_args[0] eq "internal" ) { $internal = 1; }
@@ -1965,6 +1978,11 @@ sub runrollupdate {
"S",
"ROLLUPDATE failure: $::ug_name: Node $node appstatus not in valid state for rolling update "
);
if ($::ll_reservation_id){
my @remove_res;
$remove_res[0]='CANCEL_DUE_TO_ERROR';
&remove_LL_reservations(\@remove_res);
}
exit(1);
}
}
@@ -2511,16 +2529,16 @@ sub remove_LL_reservations {
}
my @llnodes_removed;
foreach my $n (@{$nodes}) {
# change features for this node
if ($CANCEL_DUE_TO_ERROR) {
&remove_LL_updatefeature_only($n);
} else {
&change_LL_feature($n);
}
my @lln;
if ( (@lln=grep(/^$n$/,@llnodes)) | (@lln=grep(/^$n\./,@llnodes)) ) {
$remove_count++;
push (@llnodes_removed,$lln[0]);
# change features for this node
if ($CANCEL_DUE_TO_ERROR) {
&remove_LL_updatefeature_only($lln[0]);
} else {
&change_LL_feature($lln[0]);
}
if ( $remove_count < $llnode_count ) {
$remove_cmd .= " $lln[0]";
} else {
@@ -2529,6 +2547,8 @@ sub remove_LL_reservations {
}
}
}
# Send LL reconfig to all central mgrs and resource mgrs
llreconfig();
# Verify that the config change has been registered and that updatefeature
# has been removed according to what the LL daemons report
if (defined($::DATAATTRS{updatefeature}[0])) {
@@ -2684,7 +2704,7 @@ sub change_LL_feature {
}
# Send LL reconfig to all central mgrs and resource mgrs
llreconfig();
# llreconfig();
return 0;
}
@@ -2764,7 +2784,7 @@ sub remove_LL_updatefeature_only {
}
# Send LL reconfig to all central mgrs and resource mgrs
llreconfig();
# llreconfig();
return 0;
}
@@ -2811,7 +2831,7 @@ sub llreconfig {
my @llms = split(/\s+/,$llcms." ".$llrms);
my %have = ();
my @llnodes;
my $runlocal=0;
my $runlocal=1; # need to always run reconfig at least on local MN
foreach my $m (@llms) {
my ($sm,$rest) = split(/\./,$m);
my $xlated_sm = $sm;
@@ -2822,6 +2842,11 @@ sub llreconfig {
$runlocal=1;
}
}
if ( defined($::FILEATTRS{reconfiglist}[0]) ) {
push (@llnodes, split( /,/,$::FILEATTRS{reconfiglist}[0]) );
} elsif ( defined($::DATAATTRS{reconfiglist}[0]) ) {
push (@llnodes, split( /,/,$::DATAATTRS{reconfiglist}[0]) );
}
if ($runlocal) {
if ($::VERBOSE) {
open (RULOG, ">>$::LOGDIR/$::LOGFILE");

Some files were not shown because too many files have changed in this diff Show More