Compare commits

..

674 Commits

Author SHA1 Message Date
arif 547ad31bc8 Add configbridge script
* Allows to add linuxbridge
* Allows to add OVS bridges
* taken from xHRM script and modified
2015-02-17 04:00:39 +00:00
litingt 4530a2f3ec update confignics cases 2015-02-15 01:59:49 -08:00
litingt bdf1602f3c Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-02-15 01:54:43 -08:00
Leo.C.Wu 366dcba7fe #4572, post scripts configfirewall for ubuntu is NOT implemented. 2015-02-15 00:26:34 -08:00
litingt cea4d11d0e add copy iso image in case 2015-02-15 00:23:25 -08:00
Leo.C.Wu e6bc9c0e35 #4572, post scripts configfirewall for ubuntu is NOT implemented. 2015-02-15 15:25:16 +08:00
litingt 47bd617b48 remove enter character which causes failure in some cases 2015-02-14 20:43:46 -08:00
litingt 99703c4975 update for case matching 2015-02-14 20:39:08 -08:00
ertaozh 9a5301f985 fix bug 4433: chvm CN add_physlots= returns "Can not get hypervisor information" 2015-02-14 22:21:53 -05:00
ertaozh 884b1fdac9 fix bug 4434 :mkvm vm --full could not add all the resource to vm 2015-02-14 22:07:40 -05:00
daniceexi 3550373879 changed the definition of installnic and primarynic in Schema.pm:noderes table 2015-02-13 03:44:40 -05:00
daniceexi eeec7c6d4f Continue the change for avoiding sslv3 2015-02-13 03:07:51 -05:00
baiyuan 76a9da1e87 defect 4571 /etc/network/interfaces overwriten after firstboot 2015-02-12 22:58:44 -05:00
daniceexi 8eb652f9b1 Ubuntu/genimage: support multiple local mirror in osimage.pkgdir. The first one will be used to create bootstraps. The procedure to create osimage is: 1. create bootstrap with local/remote mirror; 2. add all mirror in osimage.pkgdir to sourcelist; 3. do osimage update; 4. install kernel; 5 install otherpkgs. 2015-02-12 22:43:03 -05:00
daniceexi bf7645a4f5 Continue the fix to avoid sslv3 in xcatd. In this commit, all the calling to [openssl s_client] in xcat code which used to connect to xcatd will add arguments [-no_ssl3 -no_ssl2] to avoid the using of sslv2/3 2015-02-12 20:19:00 -05:00
daniceexi b2eb57d072 Add default value for attribute site.xcatsslversion=TLSv1 to avoid using sslv3 which might cause POODLE Attach 2015-02-12 09:44:01 -05:00
litingt d41512f24c fix bug 4568, support user specified OS in xcattest configuration file 2015-02-12 00:40:55 -08:00
immarvin 662a62c57a there should be only 1 local package directory speicified in pkgdir attribute, the removed code slice seems unnecessary 2015-02-12 00:24:15 -08:00
litingt eb14f2bc5d remove openstack error message 2015-02-11 19:59:29 -08:00
Casandra Qiu 5adb477361 support confluent console for kvm 2015-02-11 10:28:19 -05:00
jjohnson2 6e4036dafb Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-02-11 10:19:44 -05:00
immarvin 9598c45746 add support for online mirrors in pkgdir during provision 2015-02-11 03:12:38 -08:00
immarvin 3faba40ece uncomment the updates/security/src entries and correct some entries in source.list 2015-02-11 01:31:11 -08:00
daniceexi 35e6a500a8 sles.pm, more code change for installnic/primarynic code refine 2015-02-11 02:52:03 -05:00
ertaozh 860600e782 fix bug 4556: There are some failed message during Ubuntu ppc64le stateless provision 2015-02-11 02:36:36 -05:00
daniceexi a2d89b5d69 Continue the change to refine installnic and primarynic code 2015-02-11 02:31:54 -05:00
jjohnson2 fd4b6db4c7 Remove dead reference to a password
The line in question is dead code, and therefore has no effect
(it either dies or gets overwritten short time later).  Removing
it makes the code cleaner and counters the tendency for someone
to think we might be using a hard coded password in this file.
2015-02-10 14:42:32 -05:00
immarvin 423f007a7f refine the code to use installnic and primarynic to generate network boot kernel parameters. All the logic to use installnic/primarynic have been put in NetworkUtils->gen_net_boot_params 2015-02-10 02:41:35 -08:00
ertaozh d90a770ef2 To use the refined code about installnic and primarynic for ubuntu 2015-02-10 04:01:54 -05:00
daniceexi e3ad7b1017 Ubuntu/genimage: support to use local mirror in pkgdir with http format 2015-02-10 03:43:58 -05:00
GONG Jie 82be975146 Add pkglist, exlist, postinstall files for RHEL 7.1 support on ppc64le 2015-02-10 15:15:34 +08:00
litingt 465c25d22b add rh7 support 2015-02-09 19:56:16 -08:00
daniceexi 18dfb991c0 refine the code to use installnic and primarynic to generate network boot kernel parameters. All the logic to use installnic/primarynic have been put in NetworkUtils->gen_net_boot_params 2015-02-09 07:02:19 -05:00
litingt 1efc379a5f update case 2015-02-09 01:59:16 -08:00
Junxiaw 3b63df478e modify xCATreg 2015-02-08 07:28:47 -08:00
linggao edbe36c98d Make nics.nicextraparams work for any user defined settings, fixed defect 4541 and 4542 2015-02-06 16:08:31 -05:00
jjohnson2 d9d0ac7835 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-02-06 14:22:18 -05:00
jjohnson2 e15c2a7595 Fix RHEL7/CentOS7 netboot with BOOTIF
xcatroot ramroot setup did not correctly change BOOTIF to
match expectations.  Remove 01- and replace - with : to match
ip output
2015-02-06 14:22:12 -05:00
Victor Hu 2bc3c5f031 Seems like mklocalrepo never worked for Zypper because the
/etc/yum.repos.d was hard coded.  Enhanced to work with
SLES distributions
2015-02-06 10:55:14 -05:00
daniceexi 54bb58fa17 code drop for ubuntu diskless genimage to use local mirror 2015-02-06 08:53:21 -05:00
ligc dc4138c13c fix for bug 4562: a shell syntax problem 2015-02-06 16:26:19 +08:00
Junxiaw 31f473c09c modify bundlelist 2015-02-05 21:09:08 -08:00
Junxiaw cc515c0aea modify bundlelist delete #chdef_t_o_attr 2015-02-05 19:09:21 -08:00
Junxiaw c0be673a4d modify bundlelist delete #chdef_t_o_attr 2015-02-05 18:51:45 -08:00
Victor Hu 15e68b1555 No man page for xCAT-confluent, comment out call to xpod2man 2015-02-05 16:26:47 -05:00
Victor Hu f8cb5bbe66 Add xCAT-confluent package to Ubuntu and Debian build scripts 2015-02-05 16:20:33 -05:00
Victor Hu 6da3d8ee0e getslnodes.py was using argparse, which is not included on centos6.5
and not available in python 2.6... switched to using docopt for
command line interface argument parsing.  This python library is
pulled in by the SoftLayer python bindings so it's not an extra step.
2015-02-05 15:57:37 -05:00
Victor Hu dccae166ad Added some changes to build xCAT-confluent 2015-02-05 15:00:59 -05:00
jjohnson2 5d963f0fee Recognize more variants of Windows 2012
Windows 2012 R2 and updates can take a number of forms, be more forgiving.
2015-02-05 13:38:00 -05:00
Casandra Qiu ef1556e494 Fix the misuse of == to compare strings in perl 2015-02-05 12:04:42 -05:00
Victor Hu 3369dfb94f Added a print out to help the user configure /etc/fstab for
automount of the consistent file storage on reboot
2015-02-05 11:05:01 -05:00
Victor Hu d324f22ed6 Renamed utility softlayer_nas.py to softlayer_storage.py.
Extended the utility to support mounting of --type=nas|consistent
The consistent performance file storage is the high available
storage type on SoftLayer.  One we supported multiple types
the "nas" in the utility name no longer made sense.
2015-02-05 10:55:24 -05:00
Bruce Potter d2e659ede3 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core
merge of addition of getslnodes.py
2015-02-05 10:09:38 -05:00
Bruce Potter 77c193fe90 rewrote getslnodes in python 2015-02-05 10:07:14 -05:00
Junxiaw 76a14a0713 modify bundlelist 2015-02-05 06:45:53 -08:00
Junxiaw 4cafcfe310 modify bundlelist 2015-02-05 03:09:50 -08:00
ertaozh 4dd21f1775 fix bug 4555: lsslp -s PBMC does not honor -n flag 2015-02-05 04:35:16 -05:00
immarvin 276abb3db3 add description of specifying multiple mirrors in the linuximage.pkgdir for ubuntu 2015-02-05 01:51:15 -08:00
Jia Zhao a578f264f1 Not run makedhcp during nodeimport 2015-02-05 13:55:30 +08:00
daniceexi d875a07bad Enable debug for otherpkgs to debug the issue that otherpkgs does not finish when install service node for sles11.3 2015-02-04 22:08:58 -05:00
Casandra Qiu 7f90f85103 Bug #4537, clean up sles12 genimage output 2015-02-04 14:22:45 -05:00
Victor Hu ad782ec517 Add files and directory framework to generate the xCAT-confluent RPM
Cleaned up some of the comments in the beginning of buildcore.sh
using spaces instead of tabs and added the build for xCAT-confluent.

The xCAT-confluent rpm is intended to be used for xCAT2.X releases to
support confluent.  This rpm has a requirement on confluent_server package.
For 2.9.1, xCAT-confluent is optional.  For 2.10, the plan is to default
the console service to confluent.
2015-02-04 14:00:40 -05:00
mellor 874f77afed defect 4082 - change previous fix to disable warnings when calling setlogsock to work with older versions of perl too 2015-02-04 08:00:03 -05:00
chudegao 09a0e5fe1f Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-02-04 10:16:05 +08:00
chudegao 530e9785ae fix 4545,restart xcatd hang due to perl syntax error in low perl version 5.10.x 2015-02-04 10:15:44 +08:00
daniceexi 7e550ebeaf pscp, fixed a code change error 2015-02-03 21:11:26 -05:00
litingt 751f918bdd update case 2015-02-02 20:05:08 -08:00
litingt 4253312315 update case 2015-02-02 19:53:16 -08:00
litingt a4ca553751 update case 2015-02-02 19:43:24 -08:00
litingt bb001497b0 update case 2015-02-02 19:40:49 -08:00
litingt d3b6905d0d update case 2015-02-02 19:32:56 -08:00
litingt e171490770 update cases 2015-02-02 19:29:22 -08:00
litingt 80cb8aecf4 update cases 2015-02-02 19:18:16 -08:00
immarvin e941049b9b add support for online mirrors during provision 2015-02-02 02:13:14 -08:00
litingt 8a4647387a update bundle list 2015-02-01 23:25:04 -08:00
litingt 6ca0cd115d update case 2015-02-01 23:16:36 -08:00
litingt e8019a65ec Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-02-01 20:26:36 -08:00
litingt 8823e07198 update case 2015-02-01 20:23:48 -08:00
litingt 5c2a0d3122 update case for arch 2015-02-01 20:16:45 -08:00
jjohnson2 3cb83b2a19 Recognize confetty installed by pip
On some systems, pip install confetty will go to
/usr/local/bin.  Recognize and accept that.
2015-01-30 17:00:19 -05:00
jjohnson2 57f9ca6acf Allow wcons to accept geometry
If user passes in geometry, intelligently merge with
tiling geometry rather than confusingly attempt to
pass it through.
2015-01-30 16:58:49 -05:00
Victor Hu 2ea900b745 Added files to xCAT-SoftLayer RPM
Create a python library for xcat as a starting point for transition
to Python based in xCAT3.  There are also plans to switch over to
using the SoftLayer Python API (over Perl)

xCAT-SoftLayer.spec file will ship lib/python/xcat directory.  A new
bin file 'softlayer_nas.py" is created to help assist users with
mounting and unmount the SoftLayer NAS shared filesystem

DevOps Task #10959 unser xCAT_SoftLayer project
2015-01-30 16:00:00 -05:00
jjohnson2 a5bc39556c Fix confetty race condition induced by wcons
wcons was leaving a common control socket defined for all invocations
of confetty.  Fix this by not setting a socket for any but the first.
The channel is currently only used for wcons initial tiling, so
it should only be bothered with for that anyway.
2015-01-30 14:26:15 -05:00
litingt 7647a67a71 add xdsh cases to daily regression 2015-01-30 01:33:49 -08:00
litingt b6a3d0283d add xdsh cases to daily regression 2015-01-30 01:32:03 -08:00
litingt 53aaea1dbf add xdsh cases to daily regression 2015-01-30 01:31:04 -08:00
litingt 922bcb6303 add xdsh cases to daily regression 2015-01-30 01:30:03 -08:00
litingt f9ba641f5c add xdsh cases to daily regression 2015-01-30 01:29:05 -08:00
litingt 1ef6d35f40 add confignics cases to daily regression 2015-01-30 01:26:31 -08:00
litingt 98cb0c6550 add confignics cases to daily regression 2015-01-30 01:18:25 -08:00
linggao 2d4b8abcaa Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-01-29 16:44:13 -05:00
linggao 1562ece18a More on building xCAT-vlan on ubuntu 2015-01-29 16:43:57 -05:00
Victor Hu 5cd9060421 The mklocalrepo.sh file is automatically created for xcat-core
and xcat-dep.  For xcat-dep on linux (non ubuntu), mklocalrepo.sh
should be executed in the <os>/<arch> subdirectory. If xCAT*.repo
file is not found in the executing directory, print out
a message to tell the user instead of creating a blank file in
/etc/yum.repos.d which will not work anyway.
2015-01-29 11:27:36 -05:00
daniceexi d3b729dadc energy.pm - changed the xml output format of renergy command which using energy.pm (p8 support) 2015-01-29 04:00:13 -05:00
litingt a69f063635 add kit cases to daily regression 2015-01-28 23:01:01 -08:00
chudegao dbc15d337b Refactor netboot attribute for adding nodes in PCM way 2015-01-29 11:31:34 +08:00
immarvin 1d6ba3646e add support for grub2-tftp and grub2-http as the netboot method 2015-01-28 01:15:23 -08:00
Jia Zhao 9c45c6ee64 Addding netboot image check for ubuntu nodeimport 2015-01-28 09:40:22 +08:00
linggao b70205c74e added vlan build for Ubuntu 2015-01-27 15:02:14 -05:00
linggao 8f50e34e6a adds xCAT-vlan nto build process 2015-01-27 14:11:48 -05:00
linggao 220374b22f add files for xCAT-vlan 2015-01-27 12:09:37 -05:00
immarvin b877e034fb #4538 [DEV] incorrect /etc/init/hvc0.conf on ubuntu 14.04.1-ppc64le kvm node after provisioning 2015-01-27 00:26:27 -08:00
Victor Hu e4486ca231 Improve the error message for the missing netboot/initrd.gz
on Ubuntu Linux.  This needs to be obtained from the Ubuntu
download site and copied over into the netboot directory.
2015-01-26 11:45:19 -05:00
ertaozh decd51de2d fix defect 4535: xcat can not get the right disk name for powerkvm VM 2015-01-26 04:31:29 -05:00
Junxiaw 6ba12f6085 modify bundle 2015-01-25 06:42:14 -08:00
ertaozh 26d4494c92 fix bug 4533 PMR: kvm vm can't be powered on when vmstoragemodel=virtio 2015-01-23 03:28:46 -05:00
linggao 7ebafe4ade minor fix in ospkgs 2015-01-22 16:03:42 -05:00
linggao a887fadd83 Supports multiple SDK cd's for sles in ospkgs and otherpkgs 2015-01-22 15:32:18 -05:00
linggao 2bd7845673 Fix sles sdk support 2015-01-22 12:23:34 -05:00
chudegao 6a703f9ea7 fix 4513 enable root logon permission in remoteshell,4522 support remove os pkgs in ubuntu pkg list 2015-01-22 16:32:03 +08:00
chudegao ebee9deebe Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-01-22 09:55:12 +08:00
linggao 788f0a4a97 Added support for mutiple sdk CDs for sles diskless 2015-01-21 18:11:56 -05:00
mellor b34537ec2e defect 4529: send msg to install monitor process to reload perl modules when rescanplugins called 2015-01-21 16:08:34 -05:00
immarvin 5684af2cef fix defect #4526 [FVT] Bash script /xcatpost/otherpkgs stuck at apt-get forever while installing ubuntu service node, eliminate the prompts while installing xcat packages 2015-01-20 23:29:21 -08:00
Victor Hu 5549d2e033 Certain system services are now started with the SLES12 operating system, to keep backwards compatiability, check if the service is in etc/init.d in the rootimg and only run inssrv on those.
Smarter code added for loading kernel modules
2015-01-20 16:38:51 -05:00
ertaozh 2436fee9c8 fix bug 4528: Three identical otherpkglist files in /etc/apt/source.list.d on service node installed via xCAT 2015-01-20 03:34:10 -05:00
ligc 1b4173456b Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-01-20 14:19:43 +08:00
ligc 93e00147f8 fix for bug 4515: start isc-dhcp-server when starting xcatd on Ubuntu MN 2015-01-20 14:19:08 +08:00
Jia Zhao 3b86d90a7c merge from 2.9 about supporting powerkvm in nodeimport 2015-01-20 14:15:07 +08:00
Casandra Qiu b040807148 fix hostname issue for diskless support 2015-01-19 16:48:40 -05:00
qyin 421a2750f9 fix copycds: on debian/ubuntu doesn't support -o option 2015-01-19 15:26:49 +08:00
chudegao 44482e2510 fix 4520,stateless hit grub for ubuntu 2015-01-19 14:28:17 +08:00
ligc a7ee19d740 fix for bug 4448: check rsyslogd existence before running rsyslogd 2015-01-19 14:22:49 +08:00
Casandra Qiu 58e8a9e0a5 genimage changes to support sles12 diskless on x86_64 2015-01-16 23:35:18 -05:00
Victor Hu ee61b112a2 [Task 6675] genimage requires dracut diretories for sles12 2015-01-16 15:41:58 -05:00
ertaozh 9195cf7faf For bug 4524: Only one local directory is supported in otherpkgdir attribute of an osimage definition 2015-01-16 04:46:25 -05:00
Junxiaw 4f98ae5159 modify autotest testcase 2015-01-16 01:16:41 -08:00
Junxiaw 8ac7bb8160 modify autotest testcase 2015-01-16 01:13:20 -08:00
ertaozh dc3fb9d4c9 fix bug 4476: Get "no free leases" when MN and target Nodes are in different subnets 2015-01-15 04:38:20 -05:00
immarvin 36faf1885b fix defect #4523 [DEV]'rpower' complains missing 'Sys::Virt perl module' in ubuntu14.04.1 ppc64el hierarchy scenario 2015-01-15 01:04:37 -08:00
litingt dc20d6b610 genimage case 2015-01-14 23:56:48 -08:00
Junxiaw 038c490f34 modify autotest installation case 2015-01-14 22:32:56 -08:00
litingt cfba09c37b add apt-key add once more before xcat installation on ubuntu 2015-01-14 19:41:18 -08:00
Junxiaw 1274f18767 modify autotest command case 2015-01-14 01:34:10 -08:00
Junxiaw 1c35227c0e modify autotest installation case 2015-01-14 01:07:10 -08:00
ertaozh 7722f97afa fix bug 4491: Switch Ubuntu diskless dir /dev mount type to devtmpfs 2015-01-14 03:24:14 -05:00
litingt f7b5607abe add copycds test case for -p,-o,-i and -w 2015-01-13 19:12:21 -08:00
immarvin 7705db6a4f fix defect #4519 [DEV]too much duplicate /etc/fstab entries on service node 2015-01-13 02:56:33 -08:00
daniceexi 312dec35bf rpower manpage: remove the incorrect request to install acpid for softoff in diskless 2015-01-11 22:04:52 -05:00
daniceexi ee57f7f934 defect 4492: confignics: don't run customized script for installnic if not specify the -s 2015-01-11 21:42:47 -05:00
Victor Hu 43717c4b11 add files to support creation of default osimage templates for sles12 diskless compute (netboot) when running copycds 2015-01-09 14:49:26 -05:00
Victor Hu d426eb6fc2 added code to recognize disc3 of SLES Server and SDK images and not overwrite disc1 due to media.1 directory 2015-01-09 14:49:21 -05:00
Victor Hu 70a1efec75 fixed incorrect day of week for 11/20/2007, causing warning when building rpm 2015-01-09 13:50:39 -05:00
ligc 573aba58d6 fix for bug 4507: check the distribution name specified with copycds -n in debian.pm 2015-01-09 15:10:59 +08:00
Leo.C.Wu 0b2ca38509 1. fix error message when removing a package in ubuntu, 2. fix error message when update packages, 3. fix apt source not correct in ospkgs 2015-01-09 11:26:09 +08:00
Leo.C.Wu c2c9052396 fix bug: 4511: post script otherpkg throws incorrect message in ubuntu/debian 2015-01-09 11:25:12 +08:00
Leo.C.Wu b55d6bf3b7 fix bug: #4512 nodeset will throw error if osimage pkgdir contains multi-value in ubuntu 2015-01-09 11:25:12 +08:00
Victor Hu 09045aca5e convert dos based compute.sles11.s390x.pkglist to linux 2015-01-08 13:36:42 -05:00
daniceexi 2c09d13724 update the manpage for renergy command that don't set power saving for P8 server which is running in OPAL mode 2015-01-08 06:26:12 -05:00
ligc 1e83fdea72 rsyslog configuration on Ubuntu, the file ownership of /var/log/messages should be syslog:adm 2015-01-08 16:23:29 +08:00
immarvin f38cd3b07c Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2015-01-08 00:47:24 -08:00
immarvin a482d160f7 fix defect [bugs:#4497] Ubuntu pre script is not executed when provision CN 2015-01-08 00:47:06 -08:00
daniceexi a73c068748 Change the gpg key to [xCAT Security Key] 2015-01-07 20:51:08 -05:00
daniceexi 4ea9e9d6fc Change the gpg key to [xCAT Security Key] 2015-01-07 01:31:46 -05:00
ertaozh af5301faab enhance for fix bug 4466: ubuntu 14.10 genimage for netboot results in an unbootable image 2015-01-07 00:05:54 -05:00
immarvin f6fec4ed6d add ubuntu service node otherpkglist 2015-01-06 20:03:31 -08:00
ertaozh 3578cdfc8d fix bug 4466: ubuntu 14.10 genimage for netboot results in an unbootable image 2015-01-06 05:43:08 -05:00
immarvin db0d13d518 add service node pkglist and template files for ubuntu 2015-01-06 02:16:27 -08:00
ertaozh 3fc42a55fb fix bug 4455: nodeset return error for ubuntu if no serialport attribute set, add warning information if no serialport attribute specified 2015-01-05 07:03:52 -05:00
ertaozh c7b16d52e1 fix bug 4455: nodeset return error for ubuntu if no serialport attribute set 2015-01-05 06:35:05 -05:00
huweihua 611b55d5f9 1. git pull will try 3 times. 2. xcat build and installation will have log 2015-01-05 04:38:02 -05:00
litingt 9c3671ed76 add xCAT commands for PCM, fix defect 4477 2015-01-04 23:37:09 -08:00
Jia Zhao b32dc297e7 fix lskmodules support ubuntu14.04 2015-01-04 16:32:37 +08:00
huweihua 1ed206cddf enhancement -a attribute 2015-01-04 03:13:45 -05:00
immarvin 4aad4a8312 fix defect [bugs:#4497] Ubuntu pre script is not executed when provision CN 2015-01-03 20:26:03 -08:00
huweihua 7300b1c598 delete status check during isntallation 2014-12-31 23:40:23 -05:00
daniceexi 5131f51509 Remove the capping related information from man page and usage 2014-12-29 03:00:32 -05:00
daniceexi ad68658c3c defect 4500: skip the PIPE signal when call xcatd->relay_fds() to receive messages from plugin processes 2014-12-29 02:47:43 -05:00
daniceexi 24fbf6eea0 defect 4496: Add feature to support the error message monitoring from installer pre script 2014-12-26 06:23:36 -05:00
daniceexi 175ac75c8e Add man page for P8 energy; some minor fixes in CIMUtils.pm and energy.pm 2014-12-26 05:58:04 -05:00
huweihua 630f2c2776 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-12-24 01:55:10 -05:00
ertaozh b8ab60014a [Energy management support for P8 with CIM] enhance of support to query power,fanspeed,cpuspeed,temp attributes 2014-12-24 01:55:57 -05:00
daniceexi 1c3496a1db defect 4492: to support comstomized script for install nic 2014-12-24 06:22:58 -05:00
huweihua b23048cd1e add support ubuntu part 2014-12-24 01:54:48 -05:00
huweihua d00c051680 fix bug of test case makeconservercf_null 2014-12-24 01:43:29 -05:00
huweihua e104d8381a add arch to case nodestat_noderange 2014-12-24 01:41:13 -05:00
daniceexi 7f23e82638 add the code to get ip of hcp from hostname 2014-12-24 02:54:47 -05:00
daniceexi 32bddb1087 add the support for syssbpower sysIPLtime 2014-12-23 11:02:40 -05:00
daniceexi e21cad3891 Merge branch 'master' of ssh://daniceexi@git.code.sf.net/p/xcat/xcat-core 2014-12-23 10:13:02 -05:00
daniceexi 378c162578 check stanby fsp ip 2014-12-23 10:12:54 -05:00
daniceexi 06f4eca23b defect 4490: In ddns.pm, to udpate all the NS server in the zone file 2014-12-23 09:03:49 -05:00
daniceexi 77d46e97cc defect 3969: support return multiple ips for networkUtils->my_ip_facing() 2014-12-23 06:59:00 -05:00
ertaozh 673372434d [Energy management support for P8 with CIM] support to query power,fanspeed,cpuspeed,temp attributes 2014-12-23 05:34:53 -05:00
ligc 5ff9396c01 fix for bug 4334: require perl-Sys-Virt explicitly 2014-12-23 13:40:04 +08:00
daniceexi 5ebd7c1f25 add the require of perl(LWP::Protocol::https) which will be used in CIMUtils.pm in xCAT-server/xCAT-server.spec 2014-12-23 04:50:41 -05:00
daniceexi 62b04f0d6c [Energy management support for P8 with CIM] support to display cim xml payload if specifying -V 2014-12-23 03:02:43 -05:00
daniceexi 06115c9cb8 more code change for P8 energy support 2014-12-23 02:42:16 -05:00
ligc 9597e0664d bug 4473: fix for locales setup for Ubuntu stateless nodes 2014-12-23 09:28:52 +08:00
daniceexi a9cc379b7f code checkin for P8 energy support with CIM 2014-12-22 08:25:43 -05:00
ligc 35bbcafc43 fix for bug 4489: shell syntax problem in otherpkgs 2014-12-22 16:19:27 +08:00
huweihua 569a4d80f6 remove odbcsetup script from SN's postscripts list 2014-12-21 22:27:35 -05:00
ertaozh 2f04a8a456 deal with "NAMEDINSTANCE" for renergy 2014-12-21 21:25:36 -05:00
Casandra Qiu cb267ebd9e bug#4488 Failed to run ospkgs for SLES12 2014-12-19 16:32:15 -05:00
Junxiaw 20ced0c162 modify autotest command bundle 2014-12-19 01:58:30 -08:00
Junxiaw 561da31533 modify bundle 2014-12-19 00:24:52 -08:00
root 3e88f028ff Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-12-19 00:22:33 -08:00
Junxiaw 4cc51b28fd modify bundle 2014-12-19 00:20:58 -08:00
ligc edfc3dbfc2 fix the problem with file "Version" 2014-12-19 14:06:10 +08:00
Junxiaw 999a474a5b modify autotest installation case 2014-12-18 19:29:07 -08:00
Junxiaw 604fc160d5 modify autotest installation case 2014-12-18 19:28:23 -08:00
Junxiaw 7b79e00498 modify pping command 2014-12-18 18:45:41 -08:00
Junxiaw 47872d2a3c modify copycds command 2014-12-18 18:40:32 -08:00
Junxiaw ad7b908e60 modify makedns command 2014-12-18 18:39:08 -08:00
Junxiaw 503a31ad51 modify makedhcp command 2014-12-18 18:37:02 -08:00
Junxiaw 88f2fa9e6a modify bundle 2014-12-18 18:28:45 -08:00
Casandra Qiu 6d27741713 #4482 Otherpkgs postscripts didn't support SLES12 2014-12-18 10:45:33 -05:00
linggao 248e391ed7 added confluent console support for replaycons command. 2014-12-18 10:28:47 -05:00
immarvin 66feb6f8fc fix defect #4481 netmask being picked up from active MN instead of Networks table 2014-12-18 00:04:22 -08:00
ligc 7b445592d3 add pkglist and template for fedora21 ppc64le 2014-12-18 14:53:55 +08:00
daniceexi 04e9c80c9c More code drop 2014-12-17 12:42:08 -05:00
ligc d4c332557e fix for bug 4472, copycds problems with rhels7.1 ppc64le 2014-12-17 11:43:09 +08:00
baiyuan a1ae55521a fix 4479 [FVT]build xCAT-buildkit failed forpods/man1/buildkit.1.pod around line 217 2014-12-16 22:10:17 -05:00
daniceexi f5fb045e0c initial version of CIM Utils 2014-12-16 09:49:12 -05:00
huweihua 4b7ac9d9b8 do some enchancement 2014-12-16 00:29:02 -05:00
daniceexi f3ba9ab3eb fix the specific format in the doc of restapi which causes the getxcatdocs (pandoc) cannot generate doc for REST_API_Reference 2014-12-14 08:40:21 -05:00
daniceexi 8232e7301f defect 4468: (NodeRange.pm) fix the issue that table_object->{_use_cache} was not turned off in Noderange which will cause the Table.pm cannot get correct column for nodelist table 2014-12-14 05:24:08 -05:00
daniceexi 127313aa16 defect 4467: In Template.pm, fix the issue that added a emptry line at the head of the parition script which causes the partition script cannot find correct shell interpreter 2014-12-14 05:18:55 -05:00
huweihua 700c97c05b Do enhancement. scope:rhp,slesp,rhx,slesx 2014-12-12 05:42:02 -05:00
ligc 0e98588df8 bug 4469: add the check for ppc64le arch in pre.rh.rhel7 2014-12-11 16:32:38 +08:00
huweihua 4924d8a9c5 do some enhancement 2014-12-11 03:10:03 -05:00
litingt 65a9cfe9bf xCAT commands bundle file on ubuntu on x 2014-12-11 00:55:53 -08:00
litingt 443d8aef02 xCAT commands bundle file on sles on x 2014-12-11 00:55:34 -08:00
litingt fb8dd3cbeb xCAT commands bundle file on rhels on X 2014-12-11 00:55:06 -08:00
litingt 275374fb99 xCAT commands bundle file on ubuntu on P 2014-12-11 00:54:35 -08:00
litingt 7dc7a1e668 xCAT commands bundle file on sles on P 2014-12-11 00:54:13 -08:00
litingt 01ad8c0032 rhels commands bundle on P 2014-12-11 00:53:17 -08:00
litingt 418eec7c40 aix command bundle file 2014-12-11 00:51:33 -08:00
huweihua 317cf1a05f fix spelling mistake 2014-12-11 00:59:54 -05:00
huweihua c370b7e2ac make xcattest can recognize MAC addr in conf file 2014-12-11 00:57:31 -05:00
ligc 64cea6d8b1 fix for bug 4463: use service network restart to restart network, and wait longer for the network adapters initialization 2014-12-10 15:45:12 +08:00
linggao dc9806c023 add more checking for gateway in configib postscript 2014-12-09 09:57:31 -05:00
ligc db84e8ee89 fix for bug 4456, change the rcons shebang line to /bin/bash 2014-12-08 14:34:36 +08:00
ligc 04cec164fa fix for bug 4459: increase the timeout value in xcatinstallpost, 11 nics takes about 40 seconds, change the wait timeout to be 180 seconds 2014-12-08 10:27:19 +08:00
linggao 729907f7eb Allow specifying mtu and connected_mode settings in configeth and configib per request from defect 3567 2014-12-04 09:32:59 -05:00
litingt bb8b43eeac new development version is 2.10 2014-12-04 00:58:44 -08:00
huweihua 1967441266 do some enhancement 2014-12-02 21:44:58 -05:00
daniceexi b02452e2fb defect 4453: In the Postage.pm, fix the issue that he xcatmaster attribute for node cannot be set to 'MASTER' env viriable in mypostscript 2014-12-03 01:12:31 -05:00
huweihua 4097b7f845 do some enhancement 2014-12-02 03:16:24 -05:00
immarvin 21da21dec2 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-12-01 07:56:49 -08:00
immarvin 628067db4d add centos7 stateless stuff 2014-12-01 07:56:25 -08:00
zhaoertao f5577e7921 fix bug 4441 xcat genimage won't install os upgrade, add the "http" started otherpkgdir into apt.list file 2014-12-01 09:12:29 -05:00
huweihua be301fac1e do some enhancement 2014-12-01 06:35:47 -05:00
immarvin 30623ebd13 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-28 01:49:50 -08:00
daniceexi 476f9f7b94 defect 4442: fix the issue in xcatd that new UDP won't exit with error message when it cannot get socket during the xcatd fast restart 2014-11-28 06:57:36 -05:00
immarvin b8602d756f fix defect #4299 Node provision failed because kickstart file have unreasonable conf which caused by switch discovery emthod 2014-11-28 01:49:33 -08:00
ligc 607e2bd385 fix for bug 4399: on Ubuntu, disable isc-dhcp-server in upstart to avoid two dhcp server daemons, let xcat totally mangae dhcp server 2014-11-28 10:13:34 +08:00
ligc 2e32683a52 fix for bug 4440: write /etc/network/interfaces to /etc/network/interfaces.d/<nicname>, check if the target file name is blank 2013-11-28 11:19:06 +08:00
ligc 5ef5b62877 Remove the AIX multicast route words from lsslp manpage, it is required after 2.7.8 2013-11-27 16:06:29 +08:00
huweihua f9430e7364 add /etc/inittab depending on doc in sourceforce 2014-11-26 02:36:13 -05:00
zhaoertao d9e87410d4 Fix bug 4381 :sles12 rcons could not work on P8LE. 2014-11-26 02:29:04 -05:00
zhaoertao 288ffa7b68 Enhance of fix bug 4381 :sles12 rcons could not work on P8LE. For ubuntu LE diskless 2014-11-26 01:23:27 -05:00
huweihua da02c2bce7 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-25 22:00:08 -05:00
huweihua 217887b177 xcat auto test provision test cases 2014-11-25 21:59:33 -05:00
daniceexi cdacb9a85f defect 4426: support persistent route setting for Ubuntu/Debian in routeop postscript 2014-11-25 12:41:13 -05:00
zhaoertao 641be270e9 fix bug 4381 :sles12 rcons could not work on P8LE. This checkin support rcons for ubuntu LE diskfull and diskless 2014-11-25 04:45:29 -05:00
immarvin d9b5d07882 fix defect #4430 On rhels7,the package util-linux-ng changed to util-linux 2014-11-24 22:28:30 -08:00
immarvin ee20161772 update the boot options of redhat family since some options are already deprecated or replaced 2014-11-24 21:50:32 -08:00
Junxiaw e6b4ca9913 add autotest testcase 2014-11-24 18:56:03 -08:00
Junxiaw c33901f267 add autotest testcase 2014-11-24 18:52:17 -08:00
root 56228c180b add autotest testcase 2014-11-24 18:49:17 -08:00
root c5549a6533 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-24 18:40:15 -08:00
daniceexi 9d0b4b1be7 4390: In DB Access process, recover the signal handle in %SIG which was cleaned up by accident. This fix should be removed if fixed the root cause of %SIG clean up. 2014-11-24 09:41:43 -05:00
Casandra Qiu c21a1d35a2 Merge branch 'master' of ssh://cxhong@216.34.181.155/p/xcat/xcat-core 2014-11-22 21:25:30 -05:00
Casandra Qiu 69bf4249be Bug#4385 mysqlsetup does not support mariaDB in Ubuntu 2014-11-22 21:24:28 -05:00
huweihua cb62009306 fix defect4393: confignics --ibport 2 Cannot find device ib0 on diskless node although ib drivers is installed 2014-11-21 06:51:20 -05:00
zhaoertao e14dc92c12 fix bug 4415: Ubuntu 14.10 diskfull installation failed on IBM PowerKVM guest 2014-11-21 02:50:51 -05:00
zhaoertao c264c8b3a8 fix bug 4424: Failed to genimage for Ubuntu 14.10 diskless node on ppc64el 2014-11-21 02:37:40 -05:00
zhaoertao c65b55b79d fix bug 4410: Command genimage failed on Ubuntu 14.04.1 ppc64el with kernelver attribute 2014-11-21 02:26:23 -05:00
immarvin 3f59552d0c fix defect #4307 [FVT]:chdef newimage -u give out wrong arch in ubuntu; fix defect #4345 Utils->osver routine does not support Redhat7 or SLES12;fix defect #4308 [FVT]: osarch default value of user defined osimage is ppc64le. needs to change to ppc64el 2014-11-21 00:19:37 -08:00
immarvin 72c058edc9 enhance the script to support various bootmgr 2014-11-20 01:57:27 -08:00
litingt b9f206c746 remove xCAT-UI xCAT-OpenStack xCAT-OpenStack-baremetal 2014-11-20 01:30:10 -08:00
zhaoertao 037ed0bcfd fix bug 4411: Typo in the command genimage output, "geniamge" -> "genimage" 2014-11-20 02:56:23 -05:00
daniceexi 029e6d18ca defect 4419: change the db notification runs in DB process instead of fork a new one since the fork new process will cause DBI connection gets into confusing 2014-11-20 07:14:50 -05:00
daniceexi 900963b1db defect 4375: fix the xcatd which has issue to receive request from xcatd which is longer than about 160,000 bytes 2014-11-20 07:08:36 -05:00
zhaoertao 089315126c fix bug 4410: Command genimage failed on Ubuntu 14.04.1 ppc64el 2014-11-20 02:00:45 -05:00
Casandra Qiu 28d2110a5e fix bug#4366 change /bin/sh to /bin/bash 2014-11-19 09:42:19 -05:00
huweihua 2b74e1de3c Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-19 06:10:05 -05:00
huweihua c5e82bb0fd fix defect4414: if there is rsync service already run, sysclone rsync server start unsuccessfully. 2014-11-19 06:09:23 -05:00
baiyuan ba51617afd fix /n after uname -p 2014-11-19 06:01:54 -05:00
huweihua 458d82a3b2 fix defect4407: Cloned rhels7 node doesn't have IP address in rh7 2014-11-19 03:32:12 -05:00
huweihua 1c0ff10789 fix defect4397: sysclone analysize genesis fs name failed in rh7.0 2014-11-19 03:23:19 -05:00
daniceexi 3a4cefe53b defect 4336,4352: in xcatd, for aix, make all the process (fix for udp process) to be stopped when received TERM singal from stopsrc command to the main process 2014-11-19 07:44:49 -05:00
zhaoertao 449ee0f808 correct postinstall scripts for ubuntu diskless 2014-11-19 03:16:44 -05:00
root a139146cba Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-18 19:18:14 -08:00
root 2d4e7c9fdd Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-16 21:33:05 -08:00
baiyuan 0d6d911fa5 defect 4394 buildkit preuninstall did not work 2014-11-14 04:50:30 -05:00
baiyuan f2f03bc718 defect 4394 buildkit preuninstall did not work 2014-11-14 04:50:15 -05:00
immarvin 72739e890d Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-14 01:30:14 -08:00
immarvin 11cd20ada5 add build timestamp to the xcat-dep 2014-11-14 01:29:29 -08:00
root 738f891d61 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-13 19:00:19 -08:00
zhaoertao 65814f3b59 fix bug 4395: ubuntu didn't get pkgdir from the osimage pkdir attribute 2014-11-13 21:54:17 -05:00
root 87fadccb22 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-13 05:45:22 -08:00
immarvin 6f4c3875d2 add xnba-undi and elilo to xCAT dependency list on ppc64le, since the 2 packages are all arch-indep 2014-11-13 00:47:49 -08:00
immarvin e9d56917fc remove some EOF ubuntu releases,add 14.10 release code 2014-11-13 00:45:46 -08:00
daniceexi ab8beaf15d change detect_dhcpd tool to support Ubuntu 2014-11-13 07:08:15 -05:00
zhaoertao e638a90375 fix bug 4392:xCAT upgrade failed because of xcat-genesis-scripts-amd64 and xcat-genesis-scripts 2014-11-13 03:25:54 -05:00
huweihua ac83f5c65f fix defect4389:omit the output of ifup command 2014-11-13 03:03:31 -05:00
huweihua 4607e8138f fix defect4388: forbid firmware update during Mellanox drives installation 2014-11-13 02:53:34 -05:00
zhaoertao e40229e41d fix bug 4391 xcat-genesis-scripts create mismatch directory with its arch 2014-11-13 02:12:03 -05:00
baiyuan 6f38163688 close debug mode 2014-11-13 01:10:55 -05:00
baiyuan 31d1cf9961 configure lsf cluster and start up lsf cluster 2014-11-13 01:07:56 -05:00
baiyuan 5f72bfa56f do lsf installation and basic configuration 2014-11-13 00:39:48 -05:00
daniceexi df970f4cb0 defect 4384: fix the issue that copycds command cannot be ctrl+c cleanly. The root cause was INT signal was not received by the plugin process after it sends out from relay_fds. The fix is to send both INT and TERM. TERM can be received in this case. 2014-11-13 03:24:33 -05:00
root 3a3256b518 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-12 21:18:07 -08:00
zhaoertao 834ae798ca fix bug 4387 :sles12:mkvm failed 2014-11-12 22:09:35 -05:00
zhaoertao b4d9167344 fix bug 4382 :increase /tmp size for default ubuntu diskless node 2014-11-12 21:34:33 -05:00
jjohnson2 e2c31bad27 Implement confluent usage by r/wcons 2014-11-12 16:48:44 -05:00
Casandra Qiu 2d1961c4f9 bug#4286 makedns should have a verbose mode 2014-11-12 10:24:38 -05:00
ligc b777d3dfa5 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-12 03:41:08 -05:00
ligc 7ee1498601 fix for bug 4341: xCAT needs perl-Digest-SHA1 but RHEL7 will not install perl-Digest-SHA1 by default 2014-11-12 03:40:54 -05:00
daniceexi 01f4cc8917 defect 4367: support rinv command to get disk information for block device like /dev/sda16 2014-11-12 05:16:27 -05:00
zhaoertao 502cc6aaad fix bug 4271 Avoid use a seperate /boot partition in the default partition strategy for Ubuntu 2014-11-12 03:38:16 -05:00
root 7bcc0909a9 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-11 22:32:53 -08:00
zhaoertao 9e86ac498c enhance for fix debug 4324: xcat provisioning of does not go consistantly to the same disk drive. 2014-11-11 21:33:47 -05:00
immarvin 84712be32c support apache2.4 in ubuntu 2014-11-11 19:04:52 -08:00
Victor Hu 3eaaa3b6f3 Bug 4373: enhance warning msg in otherpks to be more clear with yum. 2014-11-11 15:54:04 -05:00
Victor Hu a09f2d6faa add work around for umount partition question during ubuntu install 2014-11-11 15:37:29 -05:00
daniceexi 21d12983c9 Since xcatd fast restart cannot be supported in systemd enabled OS, we implemented fast restart in restartxcatd command 2014-11-11 12:18:58 -05:00
huweihua ba343557ec fix bug: disappeared in petitboot environment 2014-11-11 07:02:51 -05:00
huweihua 7f58d3fd6c fix bug: disappeared in prtitboot environment 2014-11-11 06:57:23 -05:00
zhaoertao 9f91e914d9 enhance for fix debug 4324: xcat provisioning of does not go consistantly to the same disk drive. 2014-11-11 05:11:48 -05:00
root 68fbecb21a Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-09 21:06:01 -08:00
daniceexi ce7ed0cb72 Check the version of perl-Net-DNS. If it's perl-Net-DNS-0.73-1.28, output an error message that require the update and return 2014-11-10 04:26:22 -05:00
root 084e71387b Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-09 21:04:03 -08:00
litingt 85af82dc02 add xCAT-genesis-scripts in 2014-11-09 21:44:00 -05:00
root 83bf291a3d Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-04 19:19:47 -08:00
huweihua 9f830ffc17 get rid of needless systemimager monitor service for sysclone 2014-11-04 21:52:13 -05:00
huweihua 23a132c497 fix the bug when use dracut to rebuild initrd 2014-11-04 21:45:44 -05:00
huweihua 51f9f121bc get rid of needless output 2014-11-04 21:43:02 -05:00
huweihua 06bbdbc33f support rhels7.0 2014-11-04 21:40:49 -05:00
linggao 8622f3f9bd fixed defect 2994 imgexport/imgimport problems 2014-11-04 11:39:58 -05:00
Lei Ai 1fb1b283bb set netboot to for PPC64LE 2014-11-04 22:16:09 +08:00
lissav df45650bfb defect 4355 2014-11-04 07:51:04 -05:00
lissav c31b275d54 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-03 12:42:19 -05:00
baiyuan 2ace529fee range lskit to support -K -R -C and theirs xml format 2014-11-03 03:55:24 -05:00
baiyuan 852fc3c164 back to original kit.pm 2014-11-03 03:49:19 -05:00
baiyuan b15e8e9db8 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-03 03:35:12 -05:00
zhaoertao 47c91ef186 defect lskit to support seperate -R -C as xml format 2014-11-03 07:48:57 -08:00
baiyuan c8426f9f43 pick up ligc fix for bug 4347: lsvpd does not output the word 'cpu' on Ubuntu LE 2014-11-03 03:34:33 -05:00
baiyuan 943b31d0ff defect4303 --- add -C support for lskit 2014-11-03 00:40:30 -05:00
baiyuan 5c9bd40b1f defect4303 --- add -R support for lskit 2014-11-03 00:08:49 -05:00
immarvin dd63773ee8 dd conf support for apache2.4:create a new file xcat-ws.conf.apache22 2014-10-31 03:12:25 -07:00
immarvin b6c35465dc update configuration file for apache2.4 on sles12 2014-10-31 02:48:33 -07:00
immarvin 9ba2726f83 add conf support for apache2.4 2014-10-31 02:43:22 -07:00
baiyuan ec1ef81ea8 fix defect 4349 [dev]after rmkit/rmkitcomp -i kitcomp list, kitrepo dir in otherpkgdir is not deleted 2014-10-31 04:40:09 -04:00
lissav 5078f8293b Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-30 08:49:40 -04:00
lissav 6b040b23f7 fix defect 4343 2014-10-30 08:49:19 -04:00
baiyuan 9539644ca1 fix 4344 kit repo lose mount after xcat MN reboot in ubuntu 2014-10-30 08:36:47 -04:00
zhaoertao aa0f63c2b7 fix bug 4340:could not do diskless install on p8le vm 2014-10-30 03:24:58 -04:00
root cc971870f9 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-19 17:56:15 -07:00
zhaoertao 255811ee1f fix bugs that no BOOTIF set for ubuntu diskless 2014-10-18 17:13:02 -07:00
baiyuan b9577cb9ef non_native package use this script, update sample using real content 2014-10-17 03:22:36 -04:00
immarvin 5ad09597bd replace ifconfig with ip 2014-10-16 03:00:18 -07:00
immarvin 5b5ad7d6d7 fix defect #4297 PMR 32466,L6Q,000 autoinst file generated hangs install at running postscripts 2014-10-16 02:26:27 -07:00
immarvin 2f6be40923 fix defect #4274 default otherpkgdir is /install/post/otherpkgs/ubuntu14.04/ppc64el in ubu 2014-10-15 21:24:38 -07:00
immarvin 2a494808f7 fix defect #4293 [[FVT]:genimage failed not finding otherpkg repo file 2014-10-15 08:42:35 -07:00
zhaoertao 053225fb26 fix bug 4296 :p8le hw discovery error info about syslog and dmidecode 2014-10-15 00:21:48 -07:00
ligc 3b05fc84b0 fix for bug 4290: add requires ipmitool-xcat for ppc64 2014-10-14 22:50:30 -04:00
mellor 2511cebef8 defect 4284 - fixed xcatd attempt to write to broken pipe which caused DB processes to not get killed 2014-10-14 20:48:51 -04:00
mellor c85c5acdee defect 4294 - fix rmkitcomp to recognize ubuntu prerequisite prep-kitcomp otherpkgslist entry 2014-10-14 18:35:41 -04:00
mellor 0c51f6e92a fix schema def mapping of missing kit and kitcomponent attrs 2014-10-14 18:00:39 -04:00
root 31c9e1f812 modify installation test case part sn installation on ppc64 for redhat 2014-09-18 02:04:56 -07:00
root af98c573fb modify xdcp test case part one 2014-09-17 20:08:35 -07:00
root 1eb7f10e2e modify xdcp test case part one 2014-09-17 20:06:11 -07:00
baiyuan 47d8713482 fix syntax error in postinst 2014-09-17 05:57:59 -04:00
baiyuan 7d84551ce5 fix syntax error in postinst and preinst 2014-09-17 05:57:28 -04:00
mellor b855150aee support -s PBMC for lsslp 2014-09-17 02:12:37 -07:00
root d041294800 modify rscan test case part one 2014-09-17 01:21:34 -07:00
baiyuan 8557d86359 fix absolute filename in Packages that make otherpkgs intall deb package fail 2014-09-17 04:03:46 -04:00
daniceexi a6b4056b2e Merge branch 'master' of ssh://daniceexi@git.code.sf.net/p/xcat/xcat-core 2014-09-17 02:38:08 -04:00
daniceexi e0bbf7b1db Code change to support SL6 2014-09-17 02:37:39 -04:00
baiyuan 6ec8d4c4e3 ubu power LE arch is ppc64el,ubu kit componet basename xxx-compute 2014-09-16 02:25:08 -04:00
ligc 252da58c78 fix for bug 4272: do not check php rpm, check file existence instead 2014-09-16 02:27:02 -04:00
immarvin 9d628fb636 fix defect #4155 [fvt]2.9:could not install xcat use the latest build for no perl(Confluent::Client) 2014-09-15 21:00:26 -07:00
baiyuan a4ac5c5187 add lskit/addkit/rmkit/lskitcomp/addkitcomp/rmkitcomp/chkkitcomp/lskitdeployparam 2014-09-15 22:52:27 -04:00
Bruce Potter ba9dc1cd5e Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core
updated xCAT-SoftLayer for rhel
2014-09-15 11:54:06 -04:00
Bruce Potter 2cf01b06b3 updated xCAT-SoftLayer for rhel 2014-09-15 11:53:48 -04:00
lissav f2901b06d0 fix description 2014-09-15 07:02:11 -04:00
qyin fe890637c9 fix issue 241844 The added os packages are not installed when reinstall nodes. 2014-09-15 17:32:28 +08:00
immarvin 83ed138db2 fix defect #4155 [fvt]2.9:could not install xcat use the latest build for no perl(Confluent::Client) 2014-09-15 03:04:57 -07:00
immarvin 7f8b48ba40 fix defect #4155 [fvt]2.9:could not install xcat use the latest build for no perl(Confluent::Client) 2014-09-15 02:50:34 -07:00
immarvin d0585fe056 fix defect #4155 [fvt]2.9:could not install xcat use the latest build for no perl(Confluent::Client) 2014-09-15 02:41:51 -07:00
qyin ae1dde7d9a Fix: 242668 [Rank6][Vlan] [Switch] [sles]Cannot found secure vlan network after flex up node in cluster within vlan 2014-09-15 15:55:01 +08:00
lissav 80772ee81c missed a path 2014-09-12 09:22:29 -04:00
lissav 66a38f0075 Found undocumented attribute in xcatd and added some more info to auditnosyslog 2014-09-12 09:19:19 -04:00
daniceexi a7621d345f defect 4264: fix issue in configib postscript to make it only touch the ifcfg-* files which are passed in from command line params 2014-09-12 07:52:21 -04:00
lissav 6c46d5b75d set default value for auditnosyslog on install and init DB 2014-09-12 07:29:09 -04:00
immarvin 1a5de449ef fix defect #4080 investigate RH7 kdump support 2014-09-11 20:52:23 -07:00
lissav aff90b34ac Support for auditlog without syslog 2014-09-11 13:39:55 -04:00
lissav 61b8040369 Support for auditlog without syslog 2014-09-11 13:14:04 -04:00
lissav 9a237c699b Support for auditlog without syslog 2014-09-11 13:12:56 -04:00
mellor 42b0f43780 support mtms based hardware discovery 2014-09-11 02:38:47 -07:00
litingt c66fe0d131 change git directory 2014-09-10 21:30:11 -04:00
zhaoertao 088ee8e9cd add an attribute for findme used to check it is running powerNV model 2014-09-10 01:51:06 -07:00
Jarrod Johnson 541dcf53d3 Handle more invalid characters in SPD model field if encountered 2014-09-09 13:41:19 -04:00
Jarrod Johnson 532c7d618c Recognize Lenovo IMM2 for wvid 2014-09-09 10:40:53 -04:00
mellor aab450c4de added --uploaduser as option and fixed default 2014-09-09 10:04:17 -04:00
mellor 7bbc3e8add man page updates for a new --continue flag to getxcatdocs 2014-09-09 09:40:48 -04:00
mellor 9dd06c1047 second pass at new getxcatdocs - convert tables to pandoc, fix image downloads, and more 2014-09-09 09:31:06 -04:00
lissav 40b5891c4a defect 4254 2014-09-08 12:20:14 -04:00
lissav 0c77d04e7c Defect 4270 2014-09-08 08:15:09 -04:00
Jarrod Johnson c79eca69df Add support for System X M5 generation for firmware inventory 2014-09-05 10:44:55 -04:00
zhaoertao 0f4a674527 modify genesis to support system P hardware discovery 2014-09-05 02:10:54 -07:00
huweihua 447b31ee60 modify code format error 2014-09-04 02:07:02 -04:00
zhaoertao ae5320d82b fix bug 4267:Missing includes for Sys::Syslog in /opt/xcat/lib/perl/xCAT_plugin/petitboot.pm 2014-09-03 02:04:27 -07:00
zhaoertao d8faafb4b4 add option "password" for rspconfig to change password for default user through IPMI 2014-09-03 01:21:22 -07:00
Jarrod Johnson 573fc1790f Mellanox renamed their driver in later kernels. If new name detected, substitute it 2014-09-02 10:37:23 -04:00
immarvin 8a6b60a769 #4262 The type of error message in rmosdistro is not string ref 2014-09-02 01:54:01 -07:00
huweihua 201fb1871b add Prep partition flag setting 2014-09-01 04:08:01 -04:00
huweihua ab8e64217f move Prep partition flag setting to imgcapture.pm 2014-09-01 04:03:49 -04:00
huweihua 027d4ff52a add some exclude file for support system p 2014-09-01 04:00:47 -04:00
ligc 18a3c26864 fix for bug 4265: remove getxcatdocs from PCM build 2014-08-31 23:24:42 -04:00
immarvin 1e2329be1d Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-08-31 20:53:45 -07:00
immarvin 9fae510b2e correct a typo 2014-08-31 20:52:56 -07:00
immarvin fda569d340 fix defect #4263 Some packages in pkglist file are not exist in RHEL7 2014-08-31 20:35:11 -07:00
qyin f4ef1202fe Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-09-01 10:49:59 +08:00
qyin eb5655a9e4 fix issue 241844 The added os packages are not installed when reinstall nodes. 2014-09-01 10:46:05 +08:00
lissav e140fcd040 defect 4262 2014-08-29 07:29:32 -04:00
junxiaw 3eabe15ff3 modify autotest xCATreg code 2014-08-29 00:35:59 -07:00
immarvin eaf7325a1c fix defect #4242 In physical rhel7 env,set installnic=ethx can not provision compute node. 2014-08-29 00:31:56 -07:00
Jia Zhao d87440ec41 merge from 2.8 branch about name mistake 2014-08-28 17:27:15 +08:00
ligc baa3edb3ca fix for bug 4372, set selinux be in permissive mode for RHEL 7 2013-11-26 16:49:09 +08:00
ligc fea8c45131 fix for bug 4288, add the -i flag to pasu manpage 2013-11-26 15:48:20 +08:00
ligc 01da31702e fix for bug 4421: change the term 'rpms' to 'packages' to make it be common for both RHEL/SLES and Ubuntu. Removed the postscripts/otherpkgs.ubuntu 2013-11-26 15:04:09 +08:00
ligc 358959724d fix for bug 4422: fix the ubuntu template problem with x86_64 kvm virtual machnes 2013-11-21 14:16:20 +08:00
litingt 5d55cc5dbe add help option 2014-11-19 20:28:18 -08:00
litingt 95e9cc18fb remove packages xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-OpenStack xCAT-OpenStack-baremetal in ALLBUILD 2014-11-19 20:18:59 -08:00
mellor afe37ebeab initialize rc var in Table.pm and tabutils.pm to remove warnings when running xcatd in foreground 2014-11-19 17:34:04 -05:00
ligc b19461a479 fix for bug 3343: remove the print Dumper(xxx) from the code 2013-11-20 10:53:00 +08:00
ligc 3281a3d1c3 fix for bug 4404, systemctl import-environment does not work on RHEL 7, should use systemctl set-environment 2013-11-20 10:37:03 +08:00
Casandra Qiu 5373b22b61 Bug#4408 pgsqlsetup didn't work on ubuntu 2014-11-18 09:57:24 -05:00
zhaoertao f6761bb0b7 fix bug 4126:vios:mkvm failedo 2014-11-18 05:29:23 -05:00
zhaoertao 3eec0c921d fix bug 4206: lsvm return null if the cec is in off state 2014-11-18 03:49:37 -05:00
zhaoertao 280ad16dbe fix bug 4377: add postinstall file under /opt/xcat/share/xcat/netboot/ubuntu for ubuntu support 2014-11-17 08:34:16 -05:00
ligc a74177cb86 fix for bug 4400, export DEBIAN_FRONTEND=noninteractive when running apt-get commands to avoid interactive procedure 2013-11-18 17:46:07 +08:00
ligc 02269d22b5 fix for bug 4400: add additional apt-get flag to avoid prompting interactive ations during packages installation 2013-11-18 16:29:13 +08:00
ligc f0987c908f fix for bug 4374: support running postscripts under directories in /intall/postscripts/ 2013-11-12 16:42:03 +08:00
baiyuan a049714a3e fix defect 4371 [fvt]2.9:restart xcatd error for kit.pm compilationerror 2014-11-10 03:45:48 -05:00
zhaoertao 878d9443dd enable SMT for powerKVM VMs 2014-11-10 03:09:23 -05:00
daniceexi d047c4cdf5 defect 4370: minor change in message for makedns 2014-11-10 06:34:14 -05:00
ligc cad641241d fix for bug 4369: fix the missing info in xcat.log on Ubuntu 2013-11-11 09:17:10 +08:00
Victor Hu b865f08e2e Merge branch 'bug3963' 2014-11-07 08:43:55 -05:00
baiyuan cec473c646 find the only version from dpkg -I 2014-11-07 03:20:13 -05:00
zhaoertao 392fc1b3cb fix bug 4368 mkvm for lpars in different CECs will failed 2014-11-07 03:00:38 -05:00
zhaoertao 614594fa52 4342 Wrong cpucount number is counted for PowerKVM host 2014-11-07 02:13:00 -05:00
baiyuan 340c5fc553 fix duplicate lines for IPADDR and NETMASK 2014-11-06 21:27:43 -05:00
Victor Hu b59f72bd8e changes to support --noupdate flag on genimage 2014-11-06 16:58:19 -05:00
zhaoertao 0215a5bed2 add PReP partition for sles12 ppc64le 2014-11-06 05:17:34 -05:00
daniceexi f0b9cac61c defect 4304: fixed several things: 1. how to handle ctrl+c; 2. handle the plugin process cannot be stopped by TERM signal to process group SSL_Listener. (make the plugin process locate in the SSL_listener process group); 3. Make DB Access process exits later than in processing request. 2014-11-06 06:24:50 -05:00
ligc 43c9fecd1a add sles12 pkglist and autoyast template 2014-11-06 01:38:34 -05:00
ligc b8bd2acad8 SLES12 ppc64le support: build ppc64le RPMs 2013-11-07 09:05:46 +08:00
Casandra Qiu e83055a0a1 bug #4364 change default vmnicmodel to virtio 2014-11-05 11:32:44 -05:00
zhaoertao 0705721307 fix bug 4357:After run nodeset <node> runimage' may fail 2014-11-05 06:07:30 -05:00
zhaoertao c20b47d205 enhance for fix debug 4324: xcat provisioning of does not go consistantly to the same disk drive. 2014-11-05 05:11:13 -05:00
litingt 2490baf473 update case to remove operation for xcatdport 2014-11-05 01:17:34 -08:00
huweihua 3ebf2f7851 fix the bug when use dracut to rebuild initrd 2014-11-05 02:22:40 -05:00
huweihua 00e96b2b57 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-11-05 01:52:06 -05:00
huweihua 24cc328940 add comments 2014-11-05 01:50:45 -05:00
baiyuan 8f6bd7a584 add lskitcomp -C support 2014-11-05 01:18:51 -05:00
zhaoertao 522a815c3d fix debug 4324: xcat provisioning of does not go consistantly to the same disk drive. 2014-11-05 01:00:55 -05:00
ligc da874a91f2 fix for bug 4347: lsvpd does not output the word 'cpu' on Ubuntu LE, it outputs 'processor' instead 2013-11-04 15:42:23 +08:00
zhaoertao 2170c7196f defect 4303 arrange lskit options 2014-11-03 07:13:53 -08:00
ligc f101f97df4 fix for defect 4337, add TERM into the systemd through systemctl import-environment TERM 2013-10-31 13:23:19 +08:00
mellor 0b35d9edd7 defect 4335 - remove confluent.pm and kit.pm from AIX builds 2014-10-29 10:41:13 -04:00
baiyuan dff4cad29f fix defect 3847 buildkit addpkgs -k -r left useless kit component rpm in complete kit repos dir 2014-10-29 05:14:53 -04:00
immarvin 1c379b1590 fix defect #4326 [fvt]2.9:load config file failed if more than one mac during vm install 2014-10-29 02:49:02 -07:00
ligc f6d48a858b fix for bug 4333: add the powerkvm 2.1.1 disc info 2013-10-30 15:13:01 +08:00
ligc cd4c886ba1 fix for rcons problem with kvm on SLES 12 and on PowerKVM 2013-10-30 14:55:32 +08:00
immarvin b94dcb02e4 fix defect #4326 [fvt]2.9:load config file failed if more than one mac during vm install 2014-10-29 00:54:58 -07:00
mellor 4781a420d2 defect 3348 - rmkitcomp by basename now removes all kitcomponents matching that name instead of just the highest 2014-10-28 17:47:51 -04:00
lissav c40c63ad77 defect 4329 2014-10-28 09:38:02 -04:00
lissav 424886c5d0 defect 3723 2014-10-28 07:15:05 -04:00
zhaoertao e81496cac9 support ubuntu 14.04.1 ppc64el diskless 2014-10-28 06:09:37 -04:00
baiyuan cf5ae47428 add osarch comments for Ubuntu Power LE 2014-10-28 05:46:23 -04:00
baiyuan 50f2f825ac use Utils instead of BuildkitUtils.pm 2014-10-28 05:36:29 -04:00
baiyuan 475e64aa69 use ppc64el now for ubuntu package use ppc64el 2014-10-28 05:14:42 -04:00
baiyuan dcaa4416af remove xcat-buildkit,xCAT-buildkit is here 2014-10-28 04:19:59 -04:00
immarvin ab0cba2748 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-28 01:59:34 -07:00
immarvin fead0c878e fix defect #4327 [dev] copycds should use ppc64le instead of ppc64el in ubuntu ppc64le 2014-10-28 01:58:19 -07:00
baiyuan f8db0659f0 fix 4325 Use buildkit to create kit,the osarch is always ppc64el .It's not consistenct with real osarch 2014-10-28 03:45:23 -04:00
baiyuan dab45f5df2 change name compute.ubuntu14.04.ppc64el.pkglist to compute.ubuntu14.04.ppc64le.pkglist 2014-10-28 03:39:23 -04:00
baiyuan 15bc5437f4 fix 4313 rmkitcomp, there is no options for --noscripts 2014-10-27 10:07:26 -04:00
baiyuan c57e57fc3f fix 4313 update help iniformation for some kit commands 2014-10-27 10:04:02 -04:00
baiyuan 49e7a6d393 multipul env param 2014-10-27 09:34:57 -04:00
baiyuan 13c93831bf use read only mount for kitcomponent during addkitcomp 2014-10-27 08:53:44 -04:00
baiyuan 3ec9780b6e fix 4322,genimage failed with pperte KIT componentwhich has environment variable 2014-10-27 05:59:56 -04:00
zhaoertao f5cf1968df add dependency xcat-buildkit for package xcat 2014-10-27 04:49:39 -04:00
zhaoertao a44d508044 add package xcat depending on xcat-buildkit 2014-10-27 03:57:21 -07:00
huweihua 8431d6cad9 fix defect 4295, sysclone can't clone a SLES11.3 golden client 2014-10-26 22:38:25 -04:00
Victor Hu f00771ff92 add rhel6.6 compute node media info to discinfo.pm 2014-10-24 15:03:40 -04:00
daniceexi 6244920305 Enhance the ddns.pm to support the site.dnsinterfaces for DNS server to listen on specific interfaces instead of all 2014-10-24 09:43:31 -04:00
ligc a3028511fa remove the ifnarch s390x, the ifarch/ifnarch does not work for noarch package, grub2-xcat is shipped with s390 xcat-dep 2014-10-24 03:54:08 -04:00
ligc 215e4620b6 fix for bug 4319: should not require ipmitool-xcat and xCAT-genesis-base on AIX 2013-10-25 11:47:53 +08:00
litingt b4cd2e016b add kit bucket test data 2014-10-23 19:33:05 -07:00
litingt f1a75b17d3 add addkit test cases 2014-10-23 19:25:37 -07:00
litingt 851094e6a1 add buildkit test cases 2014-10-23 19:23:32 -07:00
litingt f383d4d0fc add addkitcomp test cases 2014-10-23 19:21:46 -07:00
litingt 37672312ba add chkkitcomp test cases 2014-10-23 19:20:06 -07:00
litingt 8133553481 add lskitdeployparam test cases 2014-10-23 19:18:43 -07:00
litingt ad2b7370cc add lskit test cases 2014-10-23 19:17:35 -07:00
litingt 0db64ebb8e add rmkit case 2014-10-23 19:15:59 -07:00
litingt 85075225ca add rmkitcomp cases 2014-10-23 19:14:53 -07:00
litingt f35a5b6071 add lskitcomp cases 2014-10-23 19:13:25 -07:00
litingt 91c67cea57 add KITDATA for kit case test 2014-10-23 19:10:39 -07:00
litingt ad0118ddf9 fix defect 4314 update for ubuntu specific case support 2014-10-23 19:06:34 -07:00
lissav be7dea96d5 add setup of MN/SN SLES12/rsyslog 8 support defect 4311 2014-10-23 09:20:13 -04:00
baiyuan ae11f1f4fe fix defect 4309 lskitdeployparam -k returns kit plugin bug 2014-10-23 05:19:46 -04:00
daniceexi 50a441209b Code drop for supporting KVM/VMware based virtualization in rest api interface 2014-10-23 08:17:16 -04:00
linggao 73d08b58fa added nmapoptions in the site table to resolve network slow response issues in nmap. defect 4300 2014-10-22 18:36:59 -04:00
mellor 7e8c02bf07 defect 4304 - fixed some more interprocess communication problems 2014-10-22 17:20:07 -04:00
Victor Hu f904ce2cc1 add media tags for rhels6.6 support, x86_64 and power 2014-10-22 16:12:27 -04:00
zhaoertao 0096a8dde0 fix bug: 4310 xdsh to Cisco SG300-52 switch does not work, don't affect the original supporting 2014-10-22 15:39:24 -07:00
zhaoertao de215daef3 fix bug: 4310 xdsh to Cisco SG300-52 switch does not work 2014-10-22 14:55:08 -07:00
lissav 75f15ce9b7 SLES12/rsyslog 8 support defect 4311 2014-10-22 07:42:42 -04:00
huweihua b5f708ed39 fix defect 4289: sysclone failed to update target node with rpm update 2014-10-22 05:36:16 -04:00
huweihua ccfa70d8c8 support lvm in legacy mode on x system 2014-10-22 05:23:43 -04:00
zhaoertao c270d5e563 support copycds and nodeset for SLES 12 ppc64le 2014-10-22 08:26:00 -07:00
zhaoertao a049575c4f fix bug 4305:error info :Unknown arch during ubuntu 14.04.01 osimage nodeset on p8le env 2014-10-22 03:21:39 -07:00
daniceexi d718ba8396 defect 4283: add note head of the subtourines (in hosts.pm) which called in ddns.pm. Generally xcat does not suggest that call subroutine of xcat_plugin from antoher xcat_plugin module, but since the change would be big, I add this note head the subroutines as a notification for the member who would change the involved subroutines. 2014-10-22 02:03:07 -04:00
lissav 402c91cfcc fix syntax error 2014-10-21 15:23:44 -04:00
baiyuan 79d784a384 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-21 05:18:51 -04:00
immarvin 5b59d6eddf Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-21 03:18:22 -07:00
immarvin 2c070624ff process the genimage with kit stuff 2014-10-21 03:18:04 -07:00
baiyuan 9552485df6 genimage cannot use Symbolic link in ubuntu,use mount --band instead 2014-10-21 05:18:14 -04:00
Victor Hu 1d781ea39f Bug #3832 rewrite logic for dhcpd config, avoid dual code path 2014-10-20 14:42:54 -04:00
baiyuan 49bf7c1200 defect 4302 lskit/lskitcomp --xml has no output 2014-10-20 05:24:09 -04:00
baiyuan d5320ca977 defect 4302 lskit/lskitcomp --xml has no output 2014-10-20 05:18:19 -04:00
baiyuan 3573ced9eb defect 4301: buildkit -v does not have correct output 2014-10-20 01:53:43 -04:00
ligc 0654fa65e6 fix for bug 2796: should not include AIX perl path in @INC on Linux 2013-10-22 16:58:19 +08:00
huweihua 8ea1539aa2 remove excess debug output 2014-10-21 04:40:02 -04:00
huweihua 3ce3e80a4c add support for Ubuntu14.04.1 in p8 le 2014-10-21 04:34:35 -04:00
huweihua 2959c875ed add support for Ubuntu14.04.1 in p8 le 2014-10-21 04:32:18 -04:00
ligc fd13ae7232 fix for 4260: otherpkgs to add the fix for SL 2013-10-22 15:37:07 +08:00
ligc f474dbd1b9 fix for bug 4260: otherpkgs add /etc/yum.repos.d/xCAT-* for centos 2013-10-22 15:02:48 +08:00
ligc 9b402bb656 fix a problem in the last checkin 2013-10-21 11:11:50 +08:00
ligc e570ed6e49 remoteshell fix for SLES 12 support, sshd is not enabled by default on SLES 12, enable sshd in remoteshell postscript 2013-10-21 11:02:37 +08:00
ligc 57c53ba533 copycds supports sles12 2013-10-15 15:36:23 +08:00
ligc 99e6319765 fix for building genesis-base for PCM on MCP 2013-10-15 09:51:21 +08:00
lissav c631a0107d new fix for 4285 2014-10-13 08:28:55 -04:00
ligc 24f771dbe6 fix rpm packaging problem with xCAT-genesis-scripts 2014-10-13 03:31:06 -04:00
ligc cde6b88011 xCAT-genesis-base: add head, basename, whoami for P8 LE firmware update 2013-10-14 14:47:21 +08:00
daniceexi 088cb897b2 add the dracut_033 dir for stateless support of centos,SL,ol. It's just a dir link to the rh 2014-10-13 06:59:19 -04:00
daniceexi fdfa1fe290 defect 4283: fix the syntax issues in the hosts.pm and NetworkUtils.pm for the code that support multiple domain and makehosts against nics table 2014-10-10 11:13:39 -04:00
baiyuan 037a8db481 fix prep pakage name in kit.conf for Ubuntu 2014-10-10 06:47:03 -04:00
lissav 8ff7a04ee3 defect 4285 2014-10-10 06:38:27 -04:00
lissav 85019012cb Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-10 06:19:42 -04:00
zhaoertao dd636f8108 support firmware update for p8LE 2014-10-10 03:14:52 -07:00
lissav 33213acfae Add --ip to the interface defect 4285 2014-10-10 06:14:05 -04:00
ligc 50d51f4e40 add xfs kernel module and binary for sysclone support on RHEL 7 2013-10-11 17:31:55 +08:00
ligc ae31875596 lsdef -t auditlog may return nothing 2013-10-11 11:44:21 +08:00
Victor Hu 64c3c7c273 missed ~ in =~ in changes from dhcp.pm 2014-10-09 13:38:22 -04:00
Victor Hu 062bc44605 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-09 13:37:49 -04:00
baiyuan 425dbf90ed wrong complete kit path 2014-10-09 03:19:08 -04:00
Victor Hu 9af411c290 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-10-08 14:24:05 -04:00
Casandra Qiu 5cb4f7a8d9 bug #4081, remove syntax warnings 2014-10-08 13:51:48 -04:00
Victor Hu 1c0f2b5bef clean up formatting of dhpc.pm 2014-10-08 13:33:23 -04:00
Victor Hu e438c2f766 Add check for Ubuntu on Power7 where iso called powerpc 2014-10-08 13:32:24 -04:00
baiyuan ee82fa97b4 add fix debian preinstall script errors 2014-10-08 09:06:52 -04:00
baiyuan 97df5ec9a6 In ubuntu, rpm can be installed, if rpm is installed,ubuntu will use rpm instead of dpkg,so check dpkg first 2014-10-08 04:32:48 -04:00
daniceexi b76e15c487 minor fix for configib 2014-10-08 08:10:51 -04:00
zhaoertao 32d389cbee add message for 'mknb' in ubuntu LE 2014-10-07 23:19:36 -07:00
mellor cc67df3caa minor error msg fixes for kit cmds 2014-10-07 18:03:47 -04:00
mellor f5296e4107 fix def mapping of kitrepo osbasename attribute 2014-10-07 17:47:53 -04:00
mellor e9dd282fdf defect 4282 fix debian preinstall script errors 2014-10-07 14:05:22 -04:00
mellor 590b18a34c defect 4277 - allow gpfs_updates script to create gpfs.csh profile that works for both csh and tcsh 2014-10-06 10:20:45 -04:00
zhaoertao aea40b0226 fix an issue about hardware discovery process: the sub process can not receive findme request immediately 2014-10-04 23:20:48 -07:00
Victor Hu c3f0760164 Bug:3832 - test sles OS before checking dhcpd6 file when ipv6 used, fix formatting 2014-10-01 18:02:46 -04:00
mellor 1d241dedf0 added undocumented flag to buildkit to allow our local build team to create Ubuntu kits on our RH build servers 2014-10-01 15:16:54 -04:00
mellor 3133cbeb3f 1. add xCAT depend on xcat-genesis-scripts, 2. fix mknb issue, 3. modify xcatconfig to call mknb <ppc64/x86_64> 2014-09-29 21:26:52 -07:00
mellor 03c9a17566 Miss xCAT-buildkit in build-ubunturepo 2014-09-29 20:28:05 -07:00
mellor 88003827c9 build xCAT-genesis-scripts for p8LE 2014-09-29 20:25:37 -07:00
mellor 1aa1f30cdc added xCAT-buildkit package to build-ubunturepo 2014-09-29 17:57:23 -04:00
mellor 87840527c2 enhance for p8 hardware discovery 2014-09-26 03:55:57 -07:00
mellor 4e008d7895 enhance for p8 hardware discovery 2014-09-26 03:54:52 -07:00
huweihua e2e8463d64 add test for update delta changes 2014-09-25 22:48:53 -04:00
litingt d0198f8592 add waiting time 2014-09-25 04:39:38 -04:00
litingt 769f05bd91 add time delay 2014-09-25 04:35:31 -04:00
yinle 365b378f4b add check before sending mail to avoid mail warning 2014-09-25 15:31:11 -07:00
yinle 7ab784ea38 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-09-25 15:28:10 -07:00
yinle 5054e01a26 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-09-25 14:52:34 -07:00
ligc 6aabbe5ae2 build xCAT-genesis-scripts for ppc64 2014-09-25 02:22:46 -04:00
ligc af16b12041 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-09-25 02:17:48 -04:00
ligc 0541a3361a add Requires: xCAT-genesis-scripts-ppc64 in xCAT.spec for ppc64 arch 2014-09-25 02:17:35 -04:00
huweihua 641d9bd78a add otherpkgs.pkglist file for rh5 + system x 2014-09-25 02:10:42 -04:00
mellor b06aa3afb0 enhance of creating default netboot configuration file for p8 hardware discovery 2014-09-24 20:23:20 -07:00
ligc 7ae2e3d8f3 change the xCAT-genesis-base version from 2.8 to 2.9 2014-09-24 22:58:51 -04:00
lissav b0eff0cf94 fix build of http://xcat.sourceforge.net/man5/xcatdb.5.html 2014-09-24 07:12:23 -04:00
baiyuan d29aea3c01 add get_latest_version_deb 2014-09-24 06:46:59 -04:00
mellor 08e0ce42f0 correct the default configuration file for p8 hardware discovery 2014-09-24 02:41:55 -07:00
mellor ee1a1574c3 generate default netboot configure file for p8 hardware discovery 2014-09-24 02:38:54 -07:00
baiyuan d8eeeb306b fix dpkg compare version op 2014-09-24 04:19:33 -04:00
daniceexi ac34247aba defect 4726: cold reset bmc for specific firmware in the end of bmcsetup to make bmc take effect. 2014-09-24 03:14:32 -04:00
baiyuan ec61ef27da add metadeb and all support 2014-09-23 22:47:52 -04:00
Jarrod Johnson 4100dd77e4 Add capability for plugins to supply a description in update_tables_with_templates 2014-09-23 10:46:28 -04:00
baiyuan fc8b2cc4eb prep deb support in buildrepo 2014-09-23 06:39:08 -04:00
huweihua 0fa2dbd486 add otherpkgs.pkglist for sysclone on rh6+p, rh7+x, rh7+p 2014-09-23 04:38:37 -04:00
huweihua 7edce8ec57 add pkglist for sysclone on sles 11 and p system 2014-09-23 04:36:31 -04:00
mellor 5576b8b1f4 enhance for finding bootnic in genesis 2014-09-22 20:37:29 -07:00
baiyuan 92d313bb20 change ubu arch in validate_os 2014-09-22 23:11:15 -04:00
mellor f39c0f46a1 enhance for MTM based p8 hardware discovery 2014-09-22 19:11:16 -07:00
lissav 547cbd4217 add xmlapi test cases, they do not need to ship with rpm 2014-09-22 10:28:08 -04:00
baiyuan 25ffc91f0f find latest deb pkg 2014-09-22 04:24:00 -04:00
baiyuan a5dceadccf NEW_kit_addpkgs support debian 2014-09-22 04:09:22 -04:00
mellor 1407d0044e Do clean up things for Power LE hardware discovery 2014-09-19 08:00:13 -07:00
mellor ba706470d0 support rspconfig <node> ip/netmask/gateway for Power LE machine 2014-09-19 07:50:53 -07:00
mellor 61517af5ce remove the lsslp defined pbmc node from the found nodes 2014-09-18 20:01:37 -07:00
baiyuan ec400ad4b4 add pkg1 sample for debian kit to let default buildkit.conf work 2014-09-18 05:35:23 -04:00
immarvin 425f741435 remove temp file fron git 2014-09-18 01:19:02 -07:00
immarvin d12e49efe3 remove temp files in the git 2014-09-18 01:16:33 -07:00
yinle 04f26ded54 minor fix 2014-08-21 10:49:08 -07:00
Jia Zhao e8d48b81e0 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-08-20 16:56:49 +08:00
Jia Zhao a2332700d5 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-08-20 16:56:02 +08:00
ligc 68758810b0 fix for xCAT-genesis-builder.spec, can not use /, will cause problem for RHEL 7 2014-08-20 04:55:55 -04:00
Jia Zhao 8ced43ef98 fix long name error during import node 2014-08-20 16:55:10 +08:00
huweihua b383556d34 make mkinitrd support rhels5.x and centos5.x 2014-08-20 04:06:33 -04:00
daniceexi fc55bc9fd7 fix the issue that config alias would remove the original ip on the dev 2014-08-20 08:52:08 -04:00
Jia Zhao 99365ff4a8 add lparid in nodeimport man page 2014-08-20 15:39:25 +08:00
Jia Zhao e1c67b0724 fix no bmc ip while reinstall node 2014-08-20 15:33:29 +08:00
mellor ec38cf3e61 add copycds man pg example for supplemental iso 2014-08-19 07:41:38 -04:00
zhaoertao 2c12505a11 fix bug 4251:nodeset return xnba plugin bug, pid 657 when node mac is not defined 2014-08-19 00:25:42 -07:00
zhaoertao 2a6fe02049 fix bug 4195:rinv returns different content between with and without -x flag 2014-08-18 20:31:55 -07:00
ligc 6a44ddea08 update xcatconfig to call mknb ppc64 on power 2013-09-26 14:51:52 +08:00
ligc d7081292fc fix for 4261: add the getnodesetstat support for grub2 2013-08-29 15:18:48 +08:00
huweihua ef94ee5642 sysclone support p: set target node boot from disk after clone install 2014-08-28 02:21:56 -04:00
ligc 3beec6c8b1 fix two copyright files xCAT-genesis-scripts/debian/copyright and xCAT-OpenStack-baremetal/debian/copyright, should use EPL license 2013-08-29 09:31:54 +08:00
ligc 13b71591e0 add the qlcnic module into genesis-base, it is for Q-Logic 10Gb Virtual Fabric Adaptor NICs, ibm nx360m4 is equipped with this adapter 2013-08-28 16:39:02 +08:00
ligc 5cccca9d1c fix a problem for compiling ppc64 genesis-base 2013-08-28 16:20:01 +08:00
zhaoertao 15cc210445 fix bug 4250 xcat crashes system console on IBM power system: 8248-L4T 2014-08-27 00:50:58 -07:00
ligc 90ed515fb3 support genesis-base on ppc64: use -N with dracut command on ppc64 2013-08-28 11:25:53 +08:00
ligc 9a05a5ea1f fix the file <xxxxdirectory> from install of xCAT-genesis-scripts-ppc64-1:2.9-snap201408210348.noarch conflicts with file from package xCAT-genesis-base-ppc64-1:2.9-snap201408210346.noarch, if the rpms are built on RHEL 7 or Fedora 20 2014-08-26 04:29:01 -04:00
ligc 151409cff9 Compile genesis-base on Fedora ppc64, the ibm virtual disk module is ibmvscsi 2014-08-26 02:36:13 -04:00
Jia Zhao 975b90e619 validate cec and lparid during nodeimport 2014-08-26 14:11:31 +08:00
immarvin 9b5f4e2d05 fix defect #4246 In rhel7/p8 env,sometimes cn provision status is failed. 2014-08-25 21:29:03 -07:00
huweihua f9e77f3ddf add sfdisk command for sysclone support p 2014-08-25 03:26:34 -04:00
huweihua 18a8cdf36a sysclone support p system 2014-08-25 03:23:47 -04:00
huweihua 246f7d1e2b sysclone support p system 2014-08-25 03:15:58 -04:00
huweihua 40f96179a6 only used by sysclone, change the disk by-id name of targer node when deploy it 2014-08-25 03:00:13 -04:00
immarvin 4e9ee2bbdc add kdump support for redhat7 stateless 2014-08-24 22:30:39 -07:00
immarvin a6ca187a16 add kdump support for redhat7 2014-08-24 07:54:52 -07:00
zhaoertao 7fffc07e54 Fix bug 4257: chvm hugepage doesn't work with dfm on Powerlinux 2014-08-22 03:27:41 -07:00
Lei Ai 4753c86b38 merge fix from 2.8 branch: clear currchain while regen chain 2014-08-22 17:01:54 +08:00
mellor 812fc4b3bc man page updates for rewritten getxcatdocs to work with Allura wiki on sourceforge 2014-08-21 19:03:46 -04:00
mellor 77625c7fe9 rewrote getxcatdocs to work with Allura wiki on sourceforge 2014-08-21 16:14:29 -04:00
immarvin 6bfb39fb7d Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-08-21 02:06:05 -07:00
immarvin d92fc99a3a add template and pkglist of kvm.rhel7 2014-08-21 02:05:18 -07:00
ligc 70668c86a8 Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core 2014-08-21 03:44:23 -04:00
ligc 7ae7479c3a support xcat genesis on ppc64: check if the dmidecode exists before run dmidecode 2014-08-21 03:42:12 -04:00
zhaoertao c703748797 remove lowpower option for rpower from Usage 2014-08-21 00:26:37 -07:00
immarvin 79ad455b31 fix defect #4253 [DEV] the substitution bug in post.xcat 2014-08-21 00:08:37 -07:00
immarvin 33fd485628 fulfill the requirement of defect #4242 In physical rhel7 env,set installnic=ethx can not provision compute node. 2014-08-20 23:27:00 -07:00
ligc ac121cabbe support genesis on ppc64, compile on Fedora 20 ppc64 2013-08-22 16:04:33 +08:00
ligc c455d1dbe9 fix for bug 4249: use xCAT::Utils in ddns.pm 2013-08-20 11:02:16 +08:00
daniceexi ea56c3ebee Code change for the support of latest ganglia on ppc64 2014-08-18 10:05:09 -04:00
chenglch 7e90a37681 upgrade ironic baremetal driver for ironic update a abstract class 2014-08-17 22:21:25 -04:00
lissav 4903509b05 fix example 2014-08-14 08:09:21 -04:00
Jarrod Johnson 09ac1b8a27 Add DDR4 SPD decode 2014-08-13 17:00:37 -04:00
immarvin 83baec8526 #4227 Enhance configfirewall script to handle rhel7 firewall rule setting 2014-08-13 00:53:56 -07:00
immarvin 81e86de979 fix defect #4245 In rhels 7 env,setupntp script will show error message 2014-08-12 08:37:20 -07:00
ligc 7be4cc008c add the xCATsn into the PCM build, PCM team requires this 2014-08-12 05:43:54 -04:00
Lei Ai c635c4da8a Merge nodechmac enhance from 2.8 branch 2014-08-12 17:31:24 +08:00
huweihua 2e9cc3742f add --no-bootloader option for si_updateclient command 2014-08-12 04:55:52 -04:00
chudegao 6003b146ae merge getmacs function from 2.8.2-pcm and fix a bug 2014-08-10 22:09:21 +08:00
immarvin 3b194a3815 fix defect #4238 [FVT]: xcat installation on sles gives out /sbin/SuSEfirewall2: line 507: /proc/net/ip_tables_names: No such file or directory 2014-08-09 04:25:16 -07:00
immarvin 2c196c5b63 #4242 In physical rhel7 env,set installnic=ethx can not provision compute node. 2014-08-09 02:22:21 -07:00
immarvin 1f37d0d359 fix defect #4238 [FVT]: xcat installation on sles gives out /sbin/SuSEfirewall2: line 507: /proc/net/ip_tables_names: No such file or directory 2014-08-08 08:56:11 -07:00
immarvin 513c8d0e1b correct a typo 2014-08-07 20:35:57 -07:00
huweihua ce985114c6 add entries for support sysclone on p and LVM 2014-08-07 21:49:12 -04:00
chenglch 2366886fc9 ironic baremetal driver rsetboot net 2014-08-07 05:15:51 -04:00
daniceexi fd1a6dba31 defect 4232: fix1 - support interface named like em5 which is the general format of Ubuntu; fix2 - fix the issue that confignics cannot handle the networks attribute has multiple nets for one nic 2014-08-07 02:38:27 -04:00
yinle 4b7acd5bb1 record more log and adjust format 2014-08-06 14:48:58 -07:00
Jia Zhao 281b0ade7e fix importing node error in rh7 with power8 env 2014-08-06 13:53:15 +08:00
lissav d0ee775708 defect 4230 2014-08-05 07:31:04 -04:00
lissav da17bda0a5 fix comment for changes in 3870 2014-08-05 07:10:44 -04:00
huweihua 19e7c2071d fix bug4218:rscan -w writes wrong mgt for the CECs 2014-08-04 22:03:40 -04:00
443 changed files with 26862 additions and 5877 deletions
+1 -1
View File
@@ -1 +1 @@
2.9
2.10
+1 -1
View File
@@ -68,7 +68,7 @@ function makedeb {
}
# build all debian packages
packages="xCAT-client xCAT-nbroot xCAT-nbroot2 perl-xCAT xCAT-server xCAT-UI xCAT xCATsn xCAT-test xCAT-IBMhpc xCAT-rmc"
packages="xCAT-client xCAT-nbroot xCAT-nbroot2 perl-xCAT xCAT-server xCAT-UI xCAT xCATsn xCAT-test xCAT-IBMhpc xCAT-rmc xCAT-vlan xCAT-confluent"
for file in `echo $packages`
do
+10 -10
View File
@@ -53,7 +53,7 @@ for i in $*; do
done
# Supported distributions
dists="maverick natty oneiric precise saucy trusty"
dists="saucy trusty utopic"
c_flag= # xcat-core (trunk-delvel) path
d_flag= # xcat-dep (trunk) path
@@ -194,12 +194,12 @@ then
if [ ! -d ../../$package_dir_name ];then
mkdir -p "../../$package_dir_name"
fi
packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT-UI xCAT xCATsn xCAT-test xCAT-OpenStack xCAT-OpenStack-baremetal"
packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-buildkit xCAT-vlan xCAT-confluent"
target_archs=(amd64 ppc64el)
for file in `echo $packages`
do
file_low=`echo $file | tr '[A-Z]' '[a-z]'`
if [ "$file" = "xCAT" ]; then
if [ "$file" = "xCAT" -o "$file" = "xCAT-genesis-scripts" ]; then
target_archs="amd64 ppc64el"
else
target_archs="all"
@@ -208,8 +208,8 @@ then
do
if grep -q $file $update_log || [ "$BUILDALL" == 1 -o "$file" = "perl-xCAT" ]; then
rm -f ../../$package_dir_name/${file_low}_*.$target_arch.deb
#only for genesis package
rm -f ../../$package_dir_name/${file_low}-amd64_*.deb
#genesis scripts package, don't remove genesis amd64 files
#rm -f ../../$package_dir_name/${file_low}-amd64_*.deb
cd $file
dch -v $pkg_version -b -c debian/changelog $build_string
if [ "$target_arch" = "all" ]; then
@@ -262,7 +262,7 @@ then
mkdir conf
for dist in $dists; do
if [ "$dist" = "trusty" ]; then
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
tmp_out_arch="amd64 ppc64el"
else
tmp_out_arch="amd64"
@@ -289,7 +289,7 @@ __EOF__
amd_files=`ls ../$package_dir_name/*.deb | grep -v "ppc64el"`
all_files=`ls ../$package_dir_name/*.deb`
for dist in $dists; do
if [ "$dist" = "trusty" ]; then
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
deb_files=$all_files
else
deb_files=$amd_files
@@ -382,7 +382,7 @@ then
#create the conf/distributions file
for dist in $dists; do
if [ "$dist" = "trusty" ]; then
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
tmp_out_arch="amd64 ppc64el"
else
tmp_out_arch="amd64"
@@ -409,7 +409,7 @@ __EOF__
amd_files=`ls ../debs/*.deb | grep -v "ppc64el"`
all_files=`ls ../debs/*.deb`
for dist in $dists; do
if [ "$dist" = "trusty" ]; then
if [ "$dist" = "trusty" ] || [ "$dist" = "utopic" ]; then
deb_files=$all_files
else
deb_files=$amd_files
@@ -444,7 +444,7 @@ __EOF__
chmod -R g+w xcat-dep
#create the tar ball
dep_tar_name=xcat-dep-ubuntu.tar.bz
dep_tar_name=xcat-dep-ubuntu-snap`date +%Y%m%d`.tar.bz
tar -hjcf $dep_tar_name xcat-dep
chgrp root $dep_tar_name
chmod g+w $dep_tar_name
+50 -31
View File
@@ -12,42 +12,44 @@
# 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/ :
# apr, apr-util, bash, bzip2, db4, expat, gdbm, gettext, glib2, gmp, info, libidn, neon, openssl (won't
# 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
# apr, apr-util, bash, bzip2, db4, expat, gdbm, gettext, glib2, gmp, info, libidn, neon, openssl (won't
# 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.
# Usage: buildcore.sh [attr=value attr=value ...]
# Before running buildcore.sh, you must change the local git repo to the branch you want built, using: git checkout <branch>
# PROMOTE=1 - if the attribute "PROMOTE" is specified, means an official dot release. This does not
# actually build xcat, just uploads the most recent snap build to https://sourceforge.net/projects/xcat/files/xcat/ .
# If not specified, a snap build is assumed, which uploads to https://sourceforge.net/projects/xcat/files/yum/
# or https://sourceforge.net/projects/xcat/files/aix/.
# PREGA=1 - use this option with PROMOTE=1 on a branch that already has a released dot release, but this build is
# a GA candidate build, not to be released yet. This will result in the tarball being uploaded to
# https://sourceforge.net/projects/xcat/files/yum/ or https://sourceforge.net/projects/xcat/files/aix/
# (but the tarball file name will be like a released tarball, not a snap build). When you are ready to
# release this build, use PROMOTE=1 without PREGA
# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in prep for a release.
# UP=0 or UP=1 - override the default upload behavior
# SVNUP=<filename> - control which rpms get built by specifying a coresvnup file
# GITUP=<filename> - control which rpms get built by specifying a coregitup file
# EMBED=<embedded-environment> - the environment for which a minimal version of xcat should be built, e.g. zvm or flex
# VERBOSE=1 - to see lots of verbose output
# Before running buildcore.sh, you must change the local git repo to the branch you want built, using: git checkout <branch>
# PROMOTE=1 - if the attribute "PROMOTE" is specified, means an official dot release. This does not actually build
# xcat, just uploads the most recent snap build to https://sourceforge.net/projects/xcat/files/xcat/ .
# If not specified, a snap build is assumed, which uploads to https://sourceforge.net/projects/xcat/files/yum/
# or https://sourceforge.net/projects/xcat/files/aix/.
# PREGA=1 - use this option with PROMOTE=1 on a branch that already has a released dot release, but this build is
# a GA candidate build, not to be released yet. This will result in the tarball being uploaded to
# https://sourceforge.net/projects/xcat/files/yum/ or https://sourceforge.net/projects/xcat/files/aix/
# (but the tarball file name will be like a released tarball, not a snap build). When you are ready to
# release this build, use PROMOTE=1 without PREGA
# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in prep for a release.
# UP=0 or UP=1 - override the default upload behavior
# SVNUP=<filename> - control which rpms get built by specifying a coresvnup file
# GITUP=<filename> - control which rpms get built by specifying a coregitup file
# EMBED=<embedded-environment> - the environment for which a minimal version of xcat should be built, e.g. zvm or flex
# 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
# These are the rpms that should be built for each kind of xcat build
ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-OpenStack xCAT-SoftLayer xCAT-OpenStack-baremetal"
ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-SoftLayer xCAT-vlan xCAT-confluent"
ZVMBUILD="perl-xCAT xCAT-server xCAT-UI"
ZVMLINK="xCAT-client xCAT xCATsn"
# xCAT has PCM specific configuration - conserver-xcat, syslinux-xcat
# xCAT and xCATsn have PCM specific configuration - conserver-xcat, syslinux-xcat
# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON)
PCMBUILD="xCAT xCAT-server"
PCMLINK="perl-xCAT xCAT-client xCAT-buildkit xCAT-genesis-scripts-x86_64"
# xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON)
PCMBUILD="xCAT xCAT-server xCAT-client xCATsn"
PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64"
# Note: for FSM, the FlexCAT rpm is built separately from gsa/git
FSMBUILD="perl-xCAT xCAT-client xCAT-server"
FSMLINK=""
@@ -239,11 +241,13 @@ if [ "$OSNAME" = "AIX" ]; then
fi
# Build the rest of the noarch rpms
for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer; do
for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer xCAT-vlan xCAT-confluent; do
#if [ "$EMBED" = "zvm" -a "$rpmname" != "xCAT-server" -a "$rpmname" != "xCAT-UI" ]; then continue; fi # for zvm embedded env only need to build server and UI
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-SoftLayer" ]; then continue; fi # do not build xCAT-softlayer on aix
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-SoftLayer" ]; then continue; fi # do not build xCAT-softlayer on aix
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-vlan" ]; then continue; fi # do not build xCAT-vlan on aix
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-confluent" ]; then continue; fi # do not build xCAT-confluent on aix
if $GREP $rpmname $GITUP || [ "$BUILDALL" == 1 ]; then
UPLOAD=1
maker $rpmname
@@ -264,6 +268,8 @@ if [ "$OSNAME" != "AIX" ]; then
ORIGFAILEDRPMS="$FAILEDRPMS"
./makerpm xCAT-genesis-scripts x86_64 "$EMBED"
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-genesis-scripts-x86_64"; fi
./makerpm xCAT-genesis-scripts ppc64 "$EMBED"
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-genesis-scripts-ppc64"; fi
if [ "$FAILEDRPMS" = "$ORIGFAILEDRPMS" ]; then # all succeeded
rm -f $DESTDIR/xCAT-genesis-scripts*rpm
rm -f $SRCDIR/xCAT-genesis-scripts*rpm
@@ -275,7 +281,8 @@ if [ "$OSNAME" != "AIX" ]; then
fi
# Build the xCAT and xCATsn rpms for all platforms
for rpmname in xCAT xCATsn xCAT-OpenStack xCAT-OpenStack-baremetal; do
#for rpmname in xCAT xCATsn xCAT-OpenStack xCAT-OpenStack-baremetal; do
for rpmname in xCAT xCATsn; do
#if [ "$EMBED" = "zvm" ]; then break; fi
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # used to be: if $GREP -E "^[UAD] +$rpmname/" $GITUP; then
@@ -286,7 +293,7 @@ for rpmname in xCAT xCATsn xCAT-OpenStack xCAT-OpenStack-baremetal; do
./makerpm $rpmname "$EMBED"
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname"; fi
else
for arch in x86_64 ppc64 s390x; do
for arch in x86_64 ppc64 ppc64le s390x; do
if [ "$rpmname" = "xCAT-OpenStack" -a "$arch" != "x86_64" ] || [ "$rpmname" = "xCAT-OpenStack-baremetal" -a "$arch" != "x86_64" ] ; then continue; fi # only bld openstack for x86_64 for now
./makerpm $rpmname $arch "$EMBED"
if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname-$arch"; fi
@@ -355,7 +362,7 @@ if [ "$OSNAME" != "AIX" ]; then
echo '%_signature gpg' >> $MACROS
fi
if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name Jarrod Johnson' >> $MACROS
echo '%_gpg_name xCAT Security Key' >> $MACROS
fi
echo "Signing RPMs..."
build-utils/rpmsign.exp `find $DESTDIR -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
@@ -418,7 +425,18 @@ EOF
#!/bin/sh
cd `dirname $0`
REPOFILE=`basename xCAT-*.repo`
sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > /etc/yum.repos.d/$REPOFILE
if [[ $REPOFILE == "xCAT-*.repo" ]]; then
echo "ERROR: For xcat-dep, please execute $0 in the correct <os>/<arch> subdirectory"
exit 1
fi
#
# default to RHEL yum, if doesn't exist try Zypper
#
DIRECTORY="/etc/yum.repos.d"
if [[ ! -d ${DIRECTORY} ]]; then
DIRECTORY="/etc/zypp/repos.d"
fi
sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > ${DIRECTORY}/$REPOFILE
cd -
EOF2
chmod 775 mklocalrepo.sh
@@ -498,8 +516,9 @@ if [ "$OSNAME" != "AIX" -a "$REL" = "devel" -a "$PROMOTE" != 1 -a -z "$EMBED" ];
rpm2cpio ../$XCATCORE/perl-xCAT-*.$NOARCH.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/xCAT-test-*.$NOARCH.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/xCAT-buildkit-*.$NOARCH.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/xCAT-OpenStack-*.x86_64.rpm | cpio -id '*.html'
#rpm2cpio ../$XCATCORE/xCAT-OpenStack-*.x86_64.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/xCAT-SoftLayer-*.$NOARCH.rpm | cpio -id '*.html'
rpm2cpio ../$XCATCORE/xCAT-vlan-*.$NOARCH.rpm | cpio -id '*.html'
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
+1 -1
View File
@@ -92,7 +92,7 @@ if [ "$OSNAME" != "AIX" ]; then
echo '%_signature gpg' >> $MACROS
fi
if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name Jarrod Johnson' >> $MACROS
echo '%_gpg_name xCAT Security Key' >> $MACROS
fi
# Sign the rpms that are not already signed. The "standard input reopened" warnings are normal.
+6 -4
View File
@@ -63,7 +63,7 @@ echo "This is an Ubuntu system"
mkdir -p $CURDIR/build
for rpmname in xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test; do
for rpmname in xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-vlan; do
rpmname_low=`echo $rpmname | tr '[A-Z]' '[a-z]'`
echo "============================================"
echo "$rpmname_low"
@@ -102,15 +102,17 @@ echo "This is an $OSNAME system"
# Build the rest of the noarch rpms
for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-test xCAT-buildkit; do
for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-test xCAT-buildkit xCAT-vlan; do
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi
$CURDIR/makerpm $rpmname
done
#build xCAT-genesis-scripts if it is x86_64 platform
ARCH=$(uname -p)
if [ "$ARCH" = "x64_64" ]; then
if [ "$ARCH" = "x86_64" ]; then
$CURDIR/makerpm xCAT-genesis-scripts x86_64
else
$CURDIR/makerpm xCAT-genesis-scripts ppc64
fi
@@ -139,7 +141,7 @@ echo "This is an $OSNAME system"
#begin to create repo for redhat platform
grep -i 'Red' /etc/issue;
grep -i 'Red' /etc/*release*;
if [ "$OSNAME" != "AIX" -a $? -eq 0 ]; then
cat >$CURDIR/build/xCAT-core.repo << EOF
[xcat-2-core]
+1 -1
View File
@@ -266,7 +266,7 @@ See http://www.perl.com/doc/manual/html/pod/perlre.html for information on perl
As of xCAT 2.8.1, you can use a modified version of the regular expression support described in the previous section. You do not need to enter the node information (1st part of the expression), it will be derived from the input nodename. You only need to supply the 2nd part of the expression to determine the value to give the attribute. For examples, see
https://sourceforge.net/apps/mediawiki/xcat/index.php?title=Listing_and_Modifying_the_Database#Easy_Regular_expressions
https://sourceforge.net/p/xcat/wiki/Listing_and_Modifying_the_Database/#easy-regular-expressions
=head1 OBJECT DEFINITIONS
+462
View File
@@ -0,0 +1,462 @@
#! /usr/bin/env perl
# IBM(c) 2014 EPL license http://www.eclipse.org/legal/epl-v10.html
# This package offers subroutines to access CIM server
package xCAT::CIMUtils;
use strict;
use warnings;
use HTTP::Headers;
use HTTP::Request;
use LWP::UserAgent;
use XML::LibXML;
use Data::Dumper;
=head1 HTTP_PARAMS
A hash which includes all the parameters for accessing HTTP server. The valid parameter:
ip: The IP address of the HTTP server
user: The user to access HTTP server.
password: The password for the user.
method: The http method. (GET, PUT, POST, DELETE). Default is GET
protocol: The protocol which will be used to access HTTP server. (http/https). Default is https
format: The format of payload. Default is xml
payload: The payload of http
Example:
my %http_params = ( ip => '192.168.1.1',
port => '5989',
user => 'HMC',
password => 'admin',
method => 'POST',
protocol => 'https');
=cut
=head1 enum_instance ()
Description:
Enumerate CIM instances.
Arguments:
http_params: A reference to HTTP_PARAMS
cim_params: The CIM parameters
classname - a mandatory param to specify the class that enumerate will target to.
Return:
1 - A hash reference. The valid key includes:
rc - The return code. 0 - success. > 0 - fail.
cim_rc - The return code from CIM server.
msg - Output message.
2 - Array of instances, each instance is a hash contains lots of properties.
3 - The name path of instance
=cut
sub enum_instance
{
my $http_params = shift;
unless (ref($http_params)) {
$http_params = shift;
}
my $cim_params = shift;
# This is a mandatory parameter
unless ($cim_params->{classname}) {
return ({rc => 1, msg => "Missed the classname"});
}
unless ($cim_params->{namespace}) {
$cim_params->{namespace} = "ibmsd";
}
# prepare the CIM payload
my $tmpnode;
# create a new doc
my $doc = XML::LibXML->createDocument('1.0','UTF-8');
# create and add the root element
my $root = $doc->createElement("CIM");
$root->setAttribute("CIMVERSION", "2.0");
$root->setAttribute("DTDVERSION", "2.0");
$doc->setDocumentElement($root);
# create and add the MESSAGE element
my $message = $doc->createElement("MESSAGE");
$message->setAttribute("ID", "1000");
$message->setAttribute("PROTOCOLVERSION", "1.0");
$root->addChild($message);
# add a SIMPLE REQUEST
my $simple_request = $doc->createElement("SIMPLEREQ");
$message->addChild($simple_request);
# add an IMETHOD CALL
my $imethod_call = $doc->createElement("IMETHODCALL");
$imethod_call->setAttribute("NAME", "EnumerateInstances");
$simple_request->addChild($imethod_call);
# add the local name space path
my $localnamespacepath = $doc->createElement("LOCALNAMESPACEPATH");
$tmpnode = $doc->createElement("NAMESPACE");
$tmpnode->setAttribute("NAME", "root");
$localnamespacepath->addChild($tmpnode);
$tmpnode = $doc->createElement("NAMESPACE");
$tmpnode->setAttribute("NAME", $cim_params->{namespace});
$localnamespacepath->addChild($tmpnode);
$imethod_call->addChild($localnamespacepath);
# add the target class name
my $param_classname = $doc->createElement("IPARAMVALUE");
$param_classname->setAttribute("NAME", "ClassName");
$imethod_call->addChild($param_classname);
my $classname = $doc->createElement("CLASSNAME");
$classname->setAttribute("NAME", $cim_params->{classname});
$param_classname->addChild($classname);
# add several common parameters
$imethod_call->appendWellBalancedChunk('<IPARAMVALUE NAME="DeepInheritance"><VALUE>TRUE</VALUE></IPARAMVALUE><IPARAMVALUE NAME="LocalOnly"><VALUE>FALSE</VALUE></IPARAMVALUE><IPARAMVALUE NAME="IncludeQualifiers"><VALUE>FALSE</VALUE></IPARAMVALUE><IPARAMVALUE NAME="IncludeClassOrigin"><VALUE>TRUE</VALUE></IPARAMVALUE>');
my $payload = $doc->toString();
# generate http request
my $ret = gen_http_request($http_params, $payload);
if ($ret->{rc}) {
return $ret;
}
# send request to http server
$ret = send_http_request($http_params, $ret->{request});
if ($ret->{rc}) {
return $ret;
}
# parse the http response
my $ret_value;
my $parser = XML::LibXML->new();
my $resp_doc = $parser->parse_string($ret->{payload});
# check the error message from CIM
my $error_node = $resp_doc->getElementsByTagName("ERROR");
if ($error_node) {
my $msg = $error_node->[0]->getAttribute("DESCRIPTION");
my $errorcode = $error_node->[0]->getAttribute("CODE");
return ({rc => 1, cim_rc => $errorcode, msg => $error_node->[0]->getAttribute("DESCRIPTION")." [cim return code: $errorcode]"});
}
# get the name path of the instance, which is used to set property
my @namepath = $resp_doc->getElementsByTagName("INSTANCENAME");
my $namepath_string;
if (@namepath) {
$namepath_string = $namepath[0]->toString();
}
# get all the instance elements
my @instances = $resp_doc->getElementsByTagName("VALUE.NAMEDINSTANCE");
foreach my $instance (@instances) {
# get all the property element for each instance
my @properties = $instance->getElementsByTagName("PROPERTY");
if (my @property_arrays = $instance->getElementsByTagName("PROPERTY.ARRAY")) {
push @properties, @property_arrays;
}
my $ins_value;
foreach my $property (@properties) {
# get name, vlaue and type for each property. (only the one which has value)
if (my $pname = $property->getAttribute("NAME")) {
if (my $pvalue = $property->getAttribute("TYPE")) {
$ins_value->{property}->{$pname}->{type} = $pvalue;
}
if ($property->getElementsByTagName("VALUE.ARRAY")) {
my @nodelist = $property->getElementsByTagName("VALUE");
my @value_array = ();
foreach my $n (@nodelist) {
push @value_array, $n->textContent;
}
$ins_value->{property}->{$pname}->{value} = join(',',@value_array);
} elsif (my $node = $property->getElementsByTagName("VALUE")) {
$ins_value->{property}->{$pname}->{value} = $node->[0]->textContent;
}
}
}
push @{$ret_value}, $ins_value;
}
return ({rc =>0}, $ret_value, $namepath_string);
}
=head1 set_property ()
Description:
Set the property for an instance.
Arguments:
http_params: A reference to HTTP_PARAMS
cim_params: The CIM parameters
namepath - a mandatory param to specify the path of the instance.
It should be returned from 'enum_instance' subroutine.
Return:
1 - A hash reference. The valid key includes:
rc - The return code. 0 - success. > 0 - fail.
cim_rc - The return code from CIM server.
msg - Output message.
=cut
sub set_property
{
my $http_params = shift;
unless (ref($http_params)) {
$http_params = shift;
}
my $cim_params = shift;
# This is a mandatory parameter
unless ($cim_params->{namepath}) {
return ({rc => 1, msg => "Missed the name path for the instance"});
}
unless ($cim_params->{namespace}) {
$cim_params->{namespace} = "ibmsd";
}
# prepare the CIM payload
my $tmpnode;
# create a new doc
my $doc = XML::LibXML->createDocument('1.0','UTF-8');
# create and add the root element
my $root = $doc->createElement("CIM");
$root->setAttribute("CIMVERSION", "2.0");
$root->setAttribute("DTDVERSION", "2.0");
$doc->setDocumentElement($root);
# create and add the MESSAGE element
my $message = $doc->createElement("MESSAGE");
$message->setAttribute("ID", "1000");
$message->setAttribute("PROTOCOLVERSION", "1.0");
$root->addChild($message);
# add a SIMPLE REQUEST
my $simple_request = $doc->createElement("SIMPLEREQ");
$message->addChild($simple_request);
# add an IMETHOD CALL
my $imethod_call = $doc->createElement("IMETHODCALL");
$imethod_call->setAttribute("NAME", "SetProperty");
$simple_request->addChild($imethod_call);
# add the local name space path
my $localnamespacepath = $doc->createElement("LOCALNAMESPACEPATH");
$tmpnode = $doc->createElement("NAMESPACE");
$tmpnode->setAttribute("NAME", "root");
$localnamespacepath->addChild($tmpnode);
$tmpnode = $doc->createElement("NAMESPACE");
$tmpnode->setAttribute("NAME", $cim_params->{namespace});
$localnamespacepath->addChild($tmpnode);
$imethod_call->addChild($localnamespacepath);
# add the target property name
my $param_propertyname = $doc->createElement("IPARAMVALUE");
$param_propertyname->setAttribute("NAME", "PropertyName");
$imethod_call->addChild($param_propertyname);
$tmpnode = $doc->createElement("VALUE");
$tmpnode->appendTextNode($cim_params->{propertyname});
$param_propertyname->addChild($tmpnode);
# add the target property value
my $param_newvaluename = $doc->createElement("IPARAMVALUE");
$param_newvaluename->setAttribute("NAME", "NewValue");
$imethod_call->addChild($param_newvaluename);
$tmpnode = $doc->createElement("VALUE");
$tmpnode->appendTextNode($cim_params->{propertyvalue});
$param_newvaluename->addChild($tmpnode);
# add parameters of instance name path
my $param_namepath = $doc->createElement("IPARAMVALUE");
$param_namepath->setAttribute("NAME", "InstanceName");
$param_namepath->appendWellBalancedChunk($cim_params->{namepath});
$imethod_call->addChild($param_namepath);
my $payload = $doc->toString();
# generate http request
my $ret = gen_http_request($http_params, $payload);
if ($ret->{rc}) {
return $ret;
}
# send request to http server
$ret = send_http_request($http_params, $ret->{request});
if ($ret->{rc}) {
return $ret;
}
# parse the http response
my $ret_value;
my $parser = XML::LibXML->new();
my $resp_doc = $parser->parse_string($ret->{payload});
# check the error message from CIM
my $error_node = $resp_doc->getElementsByTagName("ERROR");
if ($error_node) {
my $msg = $error_node->[0]->getAttribute("DESCRIPTION");
my $errorcode = $error_node->[0]->getAttribute("CODE");
return ({rc => 1, cim_rc => $errorcode, msg => $error_node->[0]->getAttribute("DESCRIPTION")." [cim return code: $errorcode]"});
}
# if no http and cim error, the setting was succeeded
return ($ret);
}
=head1 gen_http_request ()
Description:
Generate a http request.
Arguments:
http_params: A reference to HTTP_PARAMS
payload: The payload for the http request. It can be null if the payload has been set in http_params.
Return:
A hash reference. The valid key includes:
rc - The return code. 0 - success. > 0 - fail.
msg - Output message
request - The generated HTTP::Request object
=cut
sub gen_http_request
{
my $http_params = shift;
my $http_payload = shift;
# check the mandatory parameters
unless (defined ($http_params->{ip}) && defined ($http_params->{port}) && defined($http_params->{user}) && defined($http_params->{password})) {
return ({rc => 1, msg => "Missed the mandatory parameters: ip, port, user or password"});
}
# set the default value for parameters
unless (defined ($http_params->{protocol})) {
$http_params->{protocol} = 'https';
}
unless (defined ($http_params->{format})) {
$http_params->{format} = 'xml';
}
unless (defined ($http_params->{method})) {
$http_params->{method} = 'GET';
}
my $payload = '';
if (defined ($http_params->{payload})) {
$payload = $http_params->{payload};
}
if (defined ($http_payload)) {
unless (ref($http_payload)) { #Todo: support payloasd to be a hash
$payload = $http_payload;
}
}
# create the http head
my $header = HTTP::Headers->new('content-type' => "application/$http_params->{format}",
'Accept' => "application/$http_params->{format}",
'User-Agent' => "xCAT/2",
'Host' => "$http_params->{ip}:$http_params->{port}");
# set the user & password
$header->authorization_basic($http_params->{user}, $http_params->{password});
# set the length of payload
my $plen = length($payload);
$header->push_header('Content-Length' => $plen);
# create the URL
my $url = "$http_params->{protocol}://$http_params->{ip}:$http_params->{port}";
my $request = HTTP::Request->new($http_params->{method}, $url, $header, $payload);
# set the http version
$request->protocol('HTTP/1.1');
return ({rc => 0, request => $request});
}
=head1 send_http_request ()
Description:
Send http request to http server and waiting for the response.
Arguments:
http_params: A reference to HTTP_PARAMS
http_request: A HTTP::Request object
Return:
A hash reference. The valid key includes:
rc - The return code. 0 - success. > 0 - fail.
http_rc - The return code of http. 200, 400 ...
msg - Output message
payload - The http response from http server
=cut
sub send_http_request
{
my $http_params = shift;
my $http_request = shift;
# Load the library LWP::Protocol::https for https support
if ($http_params->{protocol} eq 'https') {
eval { require LWP::Protocol::https};
if ($@) {
return ({rc => 1, msg => "Failed to load perl library LWP::Protocol::https"});
}
}
# create a new HTTP User Agent Object
my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0, SSL_verify_mode => 0});
if ($http_params->{timeout}) {
$ua->timeout($http_params->{timeout});
} else {
$ua->timeout(10); # the default timeout is 10s
}
if (defined($http_params->{verbose}) && defined ($http_params->{callback})) {
$http_params->{callback}({data => ["\n========CIM Request Start========", $http_request->as_string(), "=======CIM Request End======="]});
}
# send request and receive the response
my $response = $ua->request($http_request);
if (defined($http_params->{verbose}) && defined ($http_params->{callback}) && defined ($response->{_content})) {
$http_params->{callback}({data => ["\n========CIM Response Start========", $response->{_content}, "=======CIM Response End======="]});
}
# check the http response
if (defined ($response) && defined ($response->{_rc}) && defined ($response->{_msg})) {
if ($response->{_rc} eq "200" && $response->{_msg} eq "OK") {
return ({rc => 0, http_rc => $response->{_rc}, msg => "$response->{_msg} [http return code: $response->{_rc}]", payload => $response->{_content}});
}
}
return ({rc => 1, http_rc => $response->{_rc}, msg => $response->{_msg}});
}
1;
+5
View File
@@ -237,6 +237,10 @@ if (ref($request) eq 'HASH') { # the request is an array, not pure XML
}
}
my $client;
my %sslargs;
if (defined($ENV{'XCATSSLVER'})) {
$sslargs{SSL_version} = $ENV{'XCATSSLVER'};
}
if (-r $keyfile and -r $certfile and -r $cafile) {
$client = IO::Socket::SSL->start_SSL($pclient,
SSL_key_file => $keyfile,
@@ -245,6 +249,7 @@ if (ref($request) eq 'HASH') { # the request is an array, not pure XML
SSL_verify_mode => SSL_VERIFY_PEER,
SSL_use_cert => 1,
Timeout => 0,
%sslargs,
);
} else {
$client = IO::Socket::SSL->start_SSL($pclient,
+1 -1
View File
@@ -407,7 +407,7 @@ sub lshwconn_parse_args
}
if (scalar(@error_type_nodes)) {
my $tmp_nodelist = join ',', @error_type_nodes;
my $link = (scalar(@error_type_nodes) == '1')? 'is':'are';
my $link = (scalar(@error_type_nodes) eq '1')? 'is':'are';
return( ["Node type of node(s) $tmp_nodelist $link not supported for this command in FSPAPI.\n"]);
}
#$nodetypetab->close();
+8 -6
View File
@@ -517,12 +517,14 @@ sub getmacs {
$data.= "\n$_\n";
push @$value, "\n$_\n";
} elsif ( /^ent\s+/ || /^hfi-ent\s+/ ) {
my @fields = split /\s+/, $_;
my $mac = $fields[2];
$mac = format_mac( $mac );
$fields[2] = $mac;
$data .= join(" ",@fields)."\n";
push @$value, join(" ",@fields)."\n";
#my @fields = split /\s+/, $_;
#my $mac = $fields[2];
#$mac = format_mac( $mac );
#$fields[2] = $mac;
#$data .= join(" ",@fields)."\n";
#push @$value, join(" ",@fields)."\n";
$data .= "$_\n";
push @$value, "$_\n";
}
}
push @$res,[$node,$data,0];
+75 -28
View File
@@ -141,13 +141,13 @@ sub chvm_parse_extra_options {
} elsif ($cmd eq "vmmemory") {
if ($value =~ /^([\d|.]+)([G|M]?)\/([\d|.]+)([G|M]?)\/([\d|.]+)([G|M]?)$/i) {
my ($mmin, $mcur, $mmax);
if ($2 == "G" or $2 == '') {
if ($2 eq "G" or $2 eq '') {
$mmin = $1 * 1024;
}
if ($4 == "G" or $4 == '') {
if ($4 eq "G" or $4 eq '') {
$mcur = $3 * 1024;
}
if ($6 == "G" or $6 == '') {
if ($6 eq "G" or $6 eq '') {
$mmax = $5 * 1024;
}
unless ($mmin <= $mcur and $mcur <= $mmax) {
@@ -206,8 +206,9 @@ sub chvm_parse_args {
# Process command-line arguments
#############################################
if ( !defined( $args )) {
$request->{method} = $cmd;
return( \%opt );
#$request->{method} = $cmd;
#return( \%opt );
return ( usage() );
}
#############################################
# Checks case in GetOptions, allows opts
@@ -422,7 +423,7 @@ sub chvm_parse_args {
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')){
} elsif (($opt{lparname}) && ($opt{lparname} ne '*') && (scalar(@{$request->{node}}) > '1')){
return(usage( "Invalid argument: must specify '*' for more than one node" ));
}
if ((exists($opt{lparname}) ||exists($opt{huge_page})) &&
@@ -615,7 +616,6 @@ sub mkvm_parse_args {
if ( (!exists( $opt{i} ) || !exists( $opt{r} )) ) {
return(usage());
}
}
$opt{target} = \@{$request->{node}};
my $ppctab = xCAT::Table->new( 'ppc');
unless($ppctab) {
@@ -640,9 +640,11 @@ sub mkvm_parse_args {
return(usage("For Power 775, please make sure the noderange are in one CEC "));
}
}
if (exists($opt{p775})) {
#if (exists($opt{p775})) {
$request->{node} = [$other_p];
$request->{noderange} = $other_p;
#}
}
####################################
# No operands - add command name
@@ -801,6 +803,19 @@ sub do_op_extra_cmds {
if ($op eq "lparname") {
$action = "set_lpar_name";
} elsif ($op eq "huge_page") {
my @td = @$d;
@td[0] = 0;
my $tmphash = &query_cec_info_actions($request, $name, \@td, 1, ["get_huge_page"]);
if ($tmphash->{huge_page_avail}) {
if ($param > $tmphash->{huge_page_avail}) {
push @values, [$name, "No enough huge pages, only $tmphash->{huge_page_avail} pages available", 0];
$param = $tmphash->{huge_page_avail};
}
$param = "1/$param/$param";
} else {
push @values, [$name, "No huge page available to configure", 0];
next;
}
$action = "set_huge_page";
} elsif ($op eq "vmcpus") {
$action = "part_set_lpar_pending_proc";
@@ -849,21 +864,25 @@ sub do_op_extra_cmds {
my @td = @$d;
@td[0] = 0;
$memhash = &query_cec_info_actions($request, $name, \@td, 1, ["part_get_hyp_process_and_mem"]);
unless (scalar keys(%$memhash)) {
push @values, [$mtms, "Can not get hypervisor information", 1];
next;
}
if (!exists($memhash->{run})) {
if ($param =~ /(\d+)([G|M]?)\/(\d+)([G|M]?)\/(\d+)([G|M]?)/i) {
my $memsize = $memhash->{mem_region_size};
my $min = $1;
if ($2 == "G" or $2 == '') {
if ($2 eq "G" or $2 eq '') {
$min = $min * 1024;
}
$min = int($min/$memsize);
my $cur = $3;
if ($4 == "G" or $4 == '') {
if ($4 eq "G" or $4 eq '') {
$cur = $cur * 1024;
}
$cur = int($cur/$memsize);
my $max = $5;
if ($6 == "G" or $6 == '') {
if ($6 eq "G" or $6 eq '') {
$max = $max * 1024;
}
$max = int($max/$memsize);
@@ -907,10 +926,16 @@ sub do_op_extra_cmds {
push @values, [$name, "Success", '0'];
}
}
my $rethash = query_cec_info_actions($request, $name, $d, 1, \@query_array);
# need to add update db here
$lpar_hash{$name} = $rethash;
$lpar_hash{$name}->{parent} = @$d[3];
if (@query_array) {
my $rethash = query_cec_info_actions($request, $name, $d, 1, \@query_array);
unless (scalar keys(%$rethash)) {
push @values, [$mtms, "Can not get hypervisor information", 1];
next;
}
# need to add update db here
$lpar_hash{$name} = $rethash;
$lpar_hash{$name}->{parent} = @$d[3];
}
}
}
if (%lpar_hash) {
@@ -1158,7 +1183,7 @@ sub get_cec_lpar_name {
my @value = split(/\n/, $lpar_info);
foreach my $v (@value) {
if($v =~ /lparname:\s*([^\,]*),\s*lparid:\s*([\d]+),/) {
if($2 == $lparid) {
if($2 eq $lparid) {
return $1;
}
}
@@ -1682,7 +1707,7 @@ sub xCATdB {
$profile,
$parent );
return( xCAT::PPCdb::add_ppc( $hwtype, [$values] ));
return( xCAT::PPCdb::add_ppc( $hwtype, [$values],'','',"FSP" ));
}
return undef;
}
@@ -1713,7 +1738,7 @@ sub parse_part_get_info {
$hash->{process_units_avail} = $2;
} elsif ($line =~ /Authority Lpar id:(\w+)/i) {
$hash->{service_lparid} = $1;
} elsif ($line =~ /(\d+),(\d+),[^,]*,(\w+),\w*\(([\w| |-|_]*)\)/) {
} elsif ($line =~ /(\d+),(\d+),[^,]*,(\w+),\w*\(([\w| |-|_|\/]*)\)/) {
$hash->{bus}->{$3}->{cur_lparid} = $1;
$hash->{bus}->{$3}->{bus_slot} = $2;
$hash->{bus}->{$3}->{des} = $4;
@@ -1957,14 +1982,26 @@ sub query_cec_info {
}
my $rethash = query_cec_info_actions($request, $name, $d, $usage, ["part_get_lpar_processing","part_get_lpar_memory","part_get_all_io_bus_info","part_get_all_vio_info","get_huge_page","get_cec_bsr"], \%tmp_hash);
#push @result, [$name, $rethash, 0];
push @result, @$rethash;
#push @result, @$rethash;
if (scalar (@$rethash)) {
push @result, @$rethash;
} else {
push @result, [$name, "No information got", -1];
last;
}
$lpar_hash{$name} = \%tmp_hash;
$lpar_hash{$name}->{parent} = @$d[3];
}
if (@td[0] == 0) {
my $rethash = query_cec_info_actions($request, @td[3],\@td, $usage);
if (scalar (@$rethash)) {
push @result, @$rethash;
} else {
push @result, [@td[3], "No information got", -1];
last;
}
#push @result, [@td[3], $rethash, 0];
push @result, @$rethash;
#push @result, @$rethash;
}
}
if ($args->{updatedb} and %lpar_hash) {
@@ -2238,7 +2275,7 @@ sub mkspeclpar {
return([["Error","Cannot open vm table", 1]]);
}
while (my ($mtms, $h) = each (%$hash)) {
my $memhash;
my $memhash = undef;
my @nodes = keys(%$h);
my $ent = $vmtab->getNodesAttribs(\@nodes, ['cpus', 'memory','physlots', 'othersettings', 'storage', 'nics']);
while (my ($name, $d) = each (%$h)) {
@@ -2247,12 +2284,17 @@ sub mkspeclpar {
last;
}
#if (!exists($memhash->{run}))
{
#{
my @td = @$d;
@td[0] = 0;
$memhash = &query_cec_info_actions($request, $name, \@td, 1, ["part_get_hyp_process_and_mem","lpar_lhea_mac","part_get_all_io_bus_info"]);
unless (scalar keys(%$memhash)) {
push @result, [$mtms, "Can not get hypervisor information", 1];
last;
}
#$memhash->{run} = 1;
}
#}
my $tmp_ent = $ent->{$name}->[0];
if (exists($opt->{vmcpus})) {
$tmp_ent->{cpus} = $opt->{vmcpus};
@@ -2305,13 +2347,13 @@ sub mkspeclpar {
next;
}
my ($mmin, $mcur, $mmax);
if ($2 == "G" or $2 == '') {
if ($2 eq "G" or $2 eq '') {
$mmin = $1 * 1024;
}
if ($4 == "G" or $4 == '') {
if ($4 eq "G" or $4 eq '') {
$mcur = $3 * 1024;
}
if ($6 == "G" or $6 == '') {
if ($6 eq "G" or $6 eq '') {
$mmax = $5 * 1024;
}
unless ($mmin <= $mcur and $mcur <= $mmax) {
@@ -2413,6 +2455,10 @@ sub mkspeclpar {
push @result, @$values;
#need to add update db here
my $rethash = query_cec_info_actions($request, $name, $d, 1, ["part_get_lpar_processing","part_get_lpar_memory","part_get_all_vio_info","part_get_all_io_bus_info","get_huge_page","get_cec_bsr"]);
unless (scalar keys(%$rethash)) {
push @result, [$mtms, "Can not get hypervisor information", 1];
next;
}
$lpar_hash{$name} = $rethash;
$lpar_hash{$name}->{parent} = @$d[3];
@@ -2442,8 +2488,9 @@ sub mkfulllpar {
my @td = @$d;
@td[0] = 0;
$rethash = query_cec_info_actions($request, $name, \@td, 1);
if (ref($rethash) ne 'HASH') {
return ([[$mtms, "Cann't get hypervisor info hash", 1]]);
unless (scalar keys(%$rethash)) {
push @result, [$mtms, "Can not get hypervisor information", 1];
next;
}
$rethash->{run} = 1;
#print Dumper($rethash);
+63 -7
View File
@@ -629,7 +629,8 @@ sub get_adap_prop {
$cmd[0] = "\" supported-network-types\" " . $phandle . " get-package-property\r";
$msg[0] = "Status: rc and all supported network types now on stack\n";
#$pattern[0] = "(.*)3 >(.*)";
$pattern[0] = "3 >";
#$pattern[0] = "3 >";
$pattern[0] = "ok";
$newstate[0] = 1;
# state 1, return code and string on stack
@@ -637,7 +638,8 @@ sub get_adap_prop {
$cmd[1] = ".\r";
$msg[1] = "Status: All supported network types now on stack\n";
#$pattern[1] = "(.*)2 >(.*)";
$pattern[1] = "2 >";
#$pattern[1] = "2 >";
$pattern[1] = "ok";
$newstate[1] = 2;
# state 2, data ready to decode
@@ -691,6 +693,16 @@ sub get_adap_prop {
$timeout,
[ qr/$pattern[$state]/i,
sub {
if ($state eq 1) {
if ($rconsole->before() =~ /-\d+/) {
nc_msg($verbose, "Status: Error getting adapter property for phandle=$phandle.\n");
$state = 7;
$rconsole->clear_accum();
$rc = 1;
return 1;
}
}
nc_msg($verbose, $msg[$state]);
$state = $newstate[$state];
$rconsole->clear_accum();
@@ -878,6 +890,15 @@ sub get_mac_addr {
$timeout,
[qr/$pattern[$state]/=>
sub {
if ($state eq 1) {
if ($rconsole->before() =~ /-\d+/) {
nc_msg($verbose, "Status: Error getting MAC address for phandle=$phandle.\n");
$rconsole->clear_accum();
$state = 4;
$rc = 1;
return undef;
}
}
nc_msg($verbose, $msg[$state]);
$state = $newstate[$state];
$rconsole->clear_accum();
@@ -1019,7 +1040,8 @@ sub get_mac_addr {
$cmd[0] = "\" ibm,loc-code\" $phandle get-package-property\r";
$msg[0] = "Status: return code and loc-code now on stack\n";
#$pattern[0] = "(.*)3 >(.*)";
$pattern[0] = "3 >";
#$pattern[0] = "3 >";
$pattern[0] = "ok";
$newstate[0] = 1;
# cmd(1) is a dot (.). This is a stack manipulation command that removes one
@@ -1052,6 +1074,16 @@ sub get_mac_addr {
$timeout,
[qr/$pattern[$state]/=>
sub {
if ($state eq 1) {
if ($rconsole->before() =~ /-\d+/) {
nc_msg($verbose, "Status: Error getting adapter location for phandle=$phandle.");
$rconsole->clear_accum();
$state = 3;
$rc = 1;
return undef;
}
}
nc_msg($verbose, $msg[$state]);
$rconsole->clear_accum();
$state = $newstate[$state];
@@ -1125,10 +1157,19 @@ sub get_mac_addr {
return undef if ($rc eq 1);
}
# Did we find one or more adapters?
if ($result[3] =~ /(\w*):(.*):(\w*\.\w*\.\w*):/) {
$loc_code = $3;
}else {
my @loc_array = split /\n/,$result[3];
my $found = 0;
$loc_code = '';
foreach my $line ( @loc_array ) {
if ($line =~ /(\w*):(.*):([\w|\.|-]*):/) {
$loc_code .= $3;
$found = 1;
}
}
if ($found) {
$loc_code =~ s/\.$//;
return $loc_code;
} else {
return undef;
}
}
@@ -3006,6 +3047,21 @@ sub lparnetbootexp
$device_type = "physical";
}
if (defined($mac_address)) {
my @newmacs = ();
my @allmacs = split /\|/,$mac_address;
if ( !xCAT::Utils->isAIX() ) {
foreach my $mac_a ( @allmacs ) {
$mac_a = lc($mac_a);
$mac_a =~ s/(\w{2})/$1:/g;
$mac_a =~ s/:$//;
push @newmacs, $mac_a;
}
$mac_address = join("|",@newmacs);
}
}
if($colon) {
nc_msg($verbose, "$adap_type[$i]\:$loc_code\:$mac_address\:$full_path_name_array[$i]\:$ping_result\:$device_type\:\:\:\:\n");
$outputarrayindex++;
+37 -23
View File
@@ -138,8 +138,9 @@ This program module file, supports the xcat messaging and logging
N - Node informational goes to STDOUT
S - Message will be logged to syslog ( severe error)
Note S can be combined with other flags for example
SE logs message to syslog and is sent to STDERR.
SA logs message to syslog and to the auditlog DB table
SE logs message to syslog and is sent to STDERR.
SA logs message to syslog and to the auditlog DB table. (only xcatd)
A logs message auditlog DB table only. (only for xcatd)
V - verbose. This flag is not valid, the calling routine
should check for verbose mode before calling the message
@@ -175,7 +176,7 @@ This program module file, supports the xcat messaging and logging
# Message to Syslog
xCAT::MsgUtils->message('S', "Host $host not responding\n");
# Message to Syslog and auditlog table
# Message to Syslog and auditlog table (only used by xcatd)
# see tabdump -d auditlog
my $rsp = {};
$rsp->{syslogdata}->[0] = "$host not responding\n"; # for syslog
@@ -189,6 +190,18 @@ This program module file, supports the xcat messaging and logging
$rsp->{status} -> [0] = $status;
xCAT::MsgUtils->message('SA', $rsp);
# Message to only auditlog table (only used by xcatd)
# see tabdump -d auditlog
my $rsp = {};
$rsp->{userid} ->[0] = $user;
$rsp->{clientname} -> [0] = $client;
$rsp->{clienttype} -> [0] = $clienttype;
$rsp->{command} -> [0] = $command;
$rsp->{noderange} -> [0] = $noderange;
$rsp->{args} -> [0] = $arguments;
$rsp->{status} -> [0] = $status;
xCAT::MsgUtils->message('A', $rsp);
# Message to Log and Syslog
xCAT::MsgUtils->message('LS', "Host $host not responding\n");
@@ -197,44 +210,44 @@ This program module file, supports the xcat messaging and logging
Use with callback
# Message to callback
my $rsp = {};
my $rsp = {};
$rsp->{data}->[0] = "Job did not run. \n";
xCAT::MsgUtils->message("D", $rsp, $::CALLBACK);
my $rsp = {};
my $rsp = {};
$rsp->{error}->[0] = "No hosts in node list\n";
xCAT::MsgUtils->message("E", $rsp, $::CALLBACK);
my $rsp = {};
$rsp->{node}->[0]->{name}->[0] ="mynode";
$rsp->{node}->[0]->{data}->[0] ="mydata";
xCAT::MsgUtils->message("N", $rsp, $callback);
my $rsp = {};
$rsp->{node}->[0]->{name}->[0] ="mynode";
$rsp->{node}->[0]->{data}->[0] ="mydata";
xCAT::MsgUtils->message("N", $rsp, $callback);
my $rsp = {};
my $rsp = {};
$rsp->{info}->[0] = "No hosts in node list\n";
xCAT::MsgUtils->message("I", $rsp, $::CALLBACK);
my $rsp = {};
my $rsp = {};
$rsp->{sinfo}->[0] = "No hosts in node list\n";
xCAT::MsgUtils->message("IS", $rsp, $::CALLBACK);
my $rsp = {};
my $rsp = {};
$rsp->{warning}->[0] = "No hosts in node list\n";
xCAT::MsgUtils->message("W", $rsp, $::CALLBACK);
my $rsp = {};
my $rsp = {};
$rsp->{error}->[0] = "Host not responding\n";
xCAT::MsgUtils->message("S", $rsp, $::CALLBACK);
# Message to Syslog and callback
my $rsp = {};
my $rsp = {};
$rsp->{error}->[0] = "Host not responding\n";
xCAT::MsgUtils->message("SE", $rsp, $::CALLBACK);
# Message to Syslog and callback
my $rsp = {};
my $rsp = {};
$rsp->{info}->[0] = "Host not responding\n";
xCAT::MsgUtils->message("SI", $rsp, $::CALLBACK);
@@ -274,17 +287,19 @@ sub message
my $call_back = shift; # optional
my $exitcode = shift; # optional
# should be I,IS, D, E, S, SA ,LS, W , L,N
# should be I,IS, D, E, S, SA,A ,LS, W , L,N
# or S(I, D, E, S, W, L,N)
#
# if new SA option need to split syslog messages from auditlog entry
# if SA option need to split syslog messages from auditlog entry
#
my $newrsp;
if ($sev eq 'SA')
{ # if SA then need to pull first entry from $rsp
# for syslog, to preserve old interface
if (($sev eq 'SA') || ($sev eq 'A'))
{ # if SA ( syslog and auditlog) or A ( only auditlog)then need to pull first entry from $rsp
# for syslog, to preserve old interface
$newrsp = $rsp;
if ($sev eq 'SA'){ # syslog and auditlog
$rsp = $newrsp->{syslogdata}->[0];
}
}
my $stdouterrf = \*STDOUT;
my $stdouterrd = '';
@@ -449,11 +464,10 @@ sub message
}
}
# is syslog requested
# is syslog option requested
if ($sev =~ /S/)
{
# If they want this msg to also go to syslog, do that now
eval {
openlog("xCAT", "nofatal,pid", "local4");
@@ -474,7 +488,7 @@ sub message
# if write to auditlog table requested, if not on service node
if (xCAT::Utils->isMN()){
if ($sev eq 'SA')
if (($sev eq 'SA') || ($sev eq 'A'))
{
require xCAT::Table;
my $auditlogentry;
+143 -63
View File
@@ -69,14 +69,14 @@ This program module file, is a set of network utilities used by xCAT commands.
#-------------------------------------------------------------------------------
sub getNodeDomains()
{
my $class = shift;
my $class = shift;
my $nodes = shift;
my @nodelist = @$nodes;
my %nodedomains;
# Get the network info for each node
my %nethash = xCAT::DBobjUtils->getNetwkInfo(\@nodelist);
my %nethash = xCAT::DBobjUtils->getNetwkInfo(\@nodelist);
# get the site domain value
my @domains = xCAT::TableUtils->get_site_attribute("domain");
@@ -85,12 +85,13 @@ sub getNodeDomains()
# for each node - set hash value to network domain or default
# to site domain
foreach my $node (@nodelist) {
if ($nethash{$node}{domain}) {
$nodedomains{$node} = $nethash{$node}{domain};
} else {
$nodedomains{$node} = $sitedomain;
}
}
unless (defined($node)) {next;}
if (defined($nethash{$node}) && $nethash{$node}{domain}) {
$nodedomains{$node} = $nethash{$node}{domain};
} else {
$nodedomains{$node} = $sitedomain;
}
}
return \%nodedomains;
}
@@ -1097,7 +1098,8 @@ sub my_if_netmap
Error:
none
Example:
xCAT::NetworkUtils->my_ip_facing
my $ip = xCAT::NetworkUtils->my_ip_facing($peerip)
my @ip = xCAT::NetworkUtils->my_ip_facing($peerip) # return multiple
Comments:
none
=cut
@@ -1115,6 +1117,8 @@ sub my_ip_facing
unless ($peernumber) { return undef; }
my $noden = unpack("N", inet_aton($peer));
my @nets = split /\n/, `/sbin/ip addr`;
my @ips;
foreach (@nets)
{
my @elems = split /\s+/;
@@ -1127,10 +1131,19 @@ sub my_ip_facing
my $curn = unpack("N", inet_aton($curnet));
if (($noden & $curmask) == ($curn & $curmask))
{
return $curnet;
push @ips, $curnet;
}
}
return undef;
if (@ips) {
if (wantarray) {
return @ips;
} else {
return $ips[0];
}
} else {
return undef;
}
}
#-------------------------------------------------------------------------------
@@ -2017,49 +2030,6 @@ sub getNodeNameservers{
return \%nodenameservers;
}
#-------------------------------------------------------------------------------
=head3 getNodeGateway
Description:
Get gateway from the networks table of the node.
Arguments:
ip: the ip address of the node
Returns:
Return a string, of the gateway
undef - Failed to get the gateway
Globals:
none
Error:
none
Example:
my $gateway = xCAT::NetworkUtils::getNodeGateway('192.168.1.0');
Comments:
none
=cut
#-------------------------------------------------------------------------------
sub getNodeGateway
{
my $ip=shift;
if( $ip =~ /xCAT::NetworkUtils/)
{
$ip=shift;
}
my $gateway=undef;
my $nettab = xCAT::Table->new("networks");
if ($nettab) {
my @nets = $nettab->getAllAttribs('net','mask','gateway');
foreach my $net (@nets) {
if (xCAT::NetworkUtils::isInSameSubnet( $net->{'net'}, $ip, $net->{'mask'}, 0)) {
$gateway=$net->{'gateway'};
}
}
}
return $gateway;
}
#-------------------------------------------------------------------------------
@@ -2092,18 +2062,22 @@ sub getNodeNetworkCfg
$node =shift;
}
my $nets = xCAT::NetworkUtils::my_nets();
my $ip = xCAT::NetworkUtils->getipaddr($node);
my $mask = undef;
my $gateway = undef;
for my $net (keys %$nets)
{
my $netname;
($netname,$mask) = split /\//, $net;
last if ( xCAT::NetworkUtils::isInSameSubnet( $netname, $ip, $mask, 1));
my $nettab = xCAT::Table->new("networks");
if ($nettab) {
my @nets = $nettab->getAllAttribs('net','mask','gateway');
foreach my $net (@nets) {
if (xCAT::NetworkUtils::isInSameSubnet( $net->{'net'}, $ip, $net->{'mask'}, 0)) {
$gateway=$net->{'gateway'};
$mask=$net->{'mask'};
}
}
}
$gateway=xCAT::NetworkUtils::getNodeGateway($ip);
return ($ip, $node, $gateway, xCAT::NetworkUtils::formatNetmask($mask,1,0));
return ($ip, $node, $gateway, xCAT::NetworkUtils::formatNetmask($mask,0,0));
}
@@ -2181,7 +2155,13 @@ sub pingNodeStatus {
foreach (@mon_nodes) {
$deadnodes{$_}=1;
}
open (NMAP, "nmap -PE --system-dns --send-ip -sP ". $nodes . " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
# get additional options from site table
my @nmap_options = xCAT::TableUtils->get_site_attribute("nmapoptions");
my $more_options = $nmap_options[0];
#call namp
open (NMAP, "nmap -PE --system-dns --send-ip -sP $more_options ". $nodes . " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
my $node;
while (<NMAP>) {
if (/Host (.*) \(.*\) appears to be up/) {
@@ -2448,6 +2428,106 @@ sub get_all_nicips{
}
}
#-------------------------------------------------------------------------------
=head3 gen_net_boot_params
Description:
This subroutine is used to generate all possible kernel parameters for network boot (rh/sles/ubuntu + diskfull/diskless)
The supported network boot parameters:
ksdevice - Specify network device for Anaconda. For rh6 and earlier. Format: 'ksdevice={$mac|$nicname}'
BOOTIF - Specify network device for Anaconda. The boot device which set by pxe. xCAT also set it if the bootload is not pxe. Format 'BOOTIF={$mac}'
ifname - Specify a interfacename<->mac pair, it will set the interfacename to the interface which has the <mac>. Format 'ifname=$ifname:$mac'
# This will only be generated when linuximage.nodebootif is set.
bootdev - Specify the boot device. Mostly it's used with <ip> parameter and when there are multiple <ip> params. Format 'bootdev={$mac|$ifname}
ip - Specify the network configuration for an interface. Format: 'ip=dhcp', 'ip=$ifname:dhcp'
netdevice - Specify network device for Linuxrc (Suse bootloader). Format: 'netdevice={$mac|$nicname}'
netdev - Specify the interfacename which is used by xCAT diskless boot script to select the network interface. Format: 'netdev=$nicname'
Reference:
Redhat anaconda doc: https://github.com/rhinstaller/anaconda/blob/master/docs/boot-options.txt
Suse Linuxrc do: https://en.opensuse.org/SDB:Linuxrc
Arguments:
$installnic <- node.installnic
$primarynic <- node.primarynic
$macmac <- node.mac
$nodebootif <- linuximage.nodebootif
Returns:
$net_params - The key will be the parameter name, the value for the key will be the parameter value.
Valid Parameter Name:
ksdevice
netdev
netdevice
ip
ifname
BOOTIF
And following two keys also will be returned for reference
mac
nicname
Example:
my $netparams = xCAT::NetworkUtils->gen_net_boot_params($installnic, $primmarynic, $macmac, $nodebootif);
=cut
#-------------------------------------------------------------------------------
sub gen_net_boot_params
{
my $class = shift;
my $installnic = shift;
my $primarynic = shift;
my $macmac = shift;
my $nodebootif = shift;
my $net_params;
# arbitrary use primarynic if installnic is not set
unless ($installnic) {
$installnic = $primarynic;
}
# just use the installnic to generate the nic related kernel parameters
my $mac;
my $nicname;
if ((! defined ($installnic)) || ($installnic eq "") || ($installnic =~ /^mac$/i)) {
$mac = $macmac;
$net_params->{mac} = $mac;
} elsif ($installnic =~ /^[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}$/) {
$mac = $installnic;
$net_params->{mac} = $mac;
$net_params->{setmac} = $mac;
} else {
$mac = $macmac;
$nicname = $installnic;
$net_params->{nicname} = $nicname;
$net_params->{mac} = $mac;
}
if ($nicname) {
$net_params->{ksdevice} = "ksdevice=$nicname";
$net_params->{ip} = "ip=$nicname:dhcp";
$net_params->{netdev} = "netdev=$nicname";
$net_params->{netdevice} = "netdevice=$nicname";
$net_params->{ifname} = "ifname=$nodebootif:$mac";
} elsif ($mac) {
$net_params->{ksdevice} = "ksdevice=$mac";
$net_params->{BOOTIF} = "BOOTIF=$mac";
$net_params->{bootdev} = "bootdev=$mac";
$net_params->{ip} = "ip=dhcp";
if ($nodebootif) {
$net_params->{ifname} = "ifname=$nodebootif:$mac";
}
$net_params->{netdevice} = "netdevice=$mac";
}
return $net_params;
}
1;
+1
View File
@@ -196,6 +196,7 @@ sub expandatom {
$nodelist->_set_use_cache(1);
@allnodeset = $nodelist->getAllAttribs('node','groups');
%allnodehash = map { $_->{node} => 1 } @allnodeset;
$nodelist->_set_use_cache(0); #The {_use_cache} for nodelist table object must be turn off, otherwise it will keep open and affect the Table.pm subroutines like getNodesAttribs when it tries to access nodelist table to get status column.
}
my $verify = (scalar(@_) >= 1 ? shift : 1);
my %options = @_; # additional options
+1 -5
View File
@@ -311,9 +311,6 @@ sub notify {
my ($modname, $path, $suffix) = fileparse($_, ".pm");
# print "modname=$modname, path=$path, suffix=$suffix\n";
if ($suffix =~ /.pm/) { #it is a perl module
my $pid;
if ($pid=xCAT::Utils->xfork()) { }
elsif (defined($pid)) {
my $fname;
if (($path eq "") || ($path eq ".\/")) {
#default path is /opt/xcat/lib/perl/xCAT_monitoring/ if there is no path specified
@@ -328,8 +325,7 @@ sub notify {
else {
${"xCAT_monitoring::".$modname."::"}{processTableChanges}->($action, $tablename, $old_data, $new_data);
}
exit 0;
}
return 0;
}
else { #it is a command
my $pid;
+1 -1
View File
@@ -339,7 +339,7 @@ sub lshwconn_parse_args
}
if (scalar(@error_type_nodes)) {
my $tmp_nodelist = join ',', @error_type_nodes;
my $link = (scalar(@error_type_nodes) == '1')? 'is':'are';
my $link = (scalar(@error_type_nodes) eq '1')? 'is':'are';
return( ["Node type of node(s) $tmp_nodelist $link not supported for this command.\n"]);
}
$request->{nodetype} = $nodetype;
+8 -2
View File
@@ -75,6 +75,7 @@ sub add_ppc {
my $values = shift;
my $not_overwrite = shift;
my $otherinterfaces = shift;
my $callfile = shift;
my @tabs = qw(ppc vpd nodehm nodelist nodetype hosts mac);
my %db = ();
###################################
@@ -119,7 +120,12 @@ sub add_ppc {
# Specify CEC and Frame's mgt as fsp and bpa
if ( $type =~ /^cec$/) {
$mgt = "fsp";
if ( $callfile eq "PPC" ) {
$mgt = "hmc";
}
if ( $callfile eq "FSP" ) {
$mgt = "fsp";
}
}
if ( $type =~ /^frame$/) {
$mgt = "bpa";
@@ -320,7 +326,7 @@ sub update_lpar {
}
}
if (defined($write)) {
&add_ppc($hwtype, \@write_list);
&add_ppc($hwtype, \@write_list,'','',"FSP");
return ([@update_list,@write_list]);
} else {
foreach ( @tabs ) {
+7 -3
View File
@@ -14,7 +14,7 @@ use xCAT::Usage;
use xCAT::NodeRange;
use xCAT::DBobjUtils;
use xCAT::FSPUtils;
use xCAT::TableUtils qw(get_site_Master);
use xCAT::TableUtils;
%::QUERY_ATTRS = (
'savingstatus' => 1,
'dsavingstatus' => 1,
@@ -223,7 +223,6 @@ sub renergy {
my ($node, $attrs) = %$nodehash;
my $cec_name = @$attrs[2];
my $hw_type = @$attrs[4];
if (!$cec_name) {
return ([[$node, "ERROR: Cannot find the cec name, check the attributes: vpd.serial, vpd.mtm.", 1]]);
@@ -295,7 +294,12 @@ sub renergy {
foreach (@hcps_ip) {
$deadnodes{$_}=1;
}
open (NMAP, "nmap -PE --system-dns --send-ip -sP ". join(' ',@hcps_ip) . " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
# get additional options from site table
my @nmap_options = xCAT::TableUtils->get_site_attribute("nmapoptions");
my $more_options = $nmap_options[0];
open (NMAP, "nmap -PE --system-dns --send-ip -sP $more_options ". join(' ',@hcps_ip) . " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
my $node;
while (<NMAP>) {
#print "$_\n";
+37 -10
View File
@@ -555,6 +555,9 @@ sub getmacs {
} else {
$type = "virtualio";
}
if ($mac_addr) {
$mac_addr = format_mac($mac_addr);
}
my %att = ();
$att{'MAC_Address'} = ($mac_addr) ? $mac_addr : "N/A";
@@ -627,9 +630,9 @@ sub getmacs {
}
foreach ( @$value ) {
if ( /^#\s?Type/ ) {
$data.= "\n$_\n";
$data.= "\n$_\n";
} else {
$data.= format_mac( $_ );
$data.= "$_\n";
}
}
@@ -756,7 +759,7 @@ sub getmacs {
if ( /^#\s?Type/ ) {
$data.= "\n$_\n";
} elsif ( /^ent\s+/ or /^hfi-ent\s+/ ) {
$data.= format_mac( $_ );
$data.= "$_\n";
}
}
#####################################
@@ -801,10 +804,8 @@ sub cal_mac {
##########################################################################
sub format_mac {
my $data = shift;
my $mac = shift;
$data =~ /^(\S+\s+\S+\s+)(\S+)(\s+.*)$/;
my $mac = $2;
#####################################
# Get adapter mac
#####################################
@@ -813,6 +814,10 @@ sub format_mac {
if ( !xCAT::Utils->isAIX() ) {
foreach my $mac_a ( @macs ) {
if (&checkmac($mac_a)) {
push @newmacs, $mac_a;
next;
}
#################################
# Delineate MAC with colons
#################################
@@ -821,14 +826,30 @@ sub format_mac {
$mac_a =~ s/:$//;
push @newmacs, $mac_a;
}
my $newmac = join("|",@newmacs);
$data =~ s/$mac/$newmac/;
$mac = join("|",@newmacs);
}
return( "$data\n" );
return( "$mac\n" );
}
##########################################################################
# checkmac format
##########################################################################
sub checkmac {
my $mac = shift;
if ( !xCAT::Utils->isAIX()) {
if ($mac =~ /\w{2}:\w{2}:\w{2}:\w{2}:\w{2}:\w{2}/) {
return 1;
} else {
return 0;
}
} else {
return 1;
}
}
##########################################################################
# Write first valid adapter MAC to database
@@ -847,6 +868,9 @@ sub writemac {
# Find first valid adapter
#####################################
foreach ( @$data ) {
unless (&checkmac($_)) {
next;
}
if ( /^ent\s+/ or /^hfi-ent\s+/ ) {
$value = $_;
#####################################
@@ -869,6 +893,9 @@ sub writemac {
#####################################
if ( $pingret ne "successful" ) {
foreach ( @$data ) {
unless (&checkmac($_)) {
next;
}
if ( /^ent\s+/ or /^hfi-ent\s+/ ) {
$value = $_;
$ping_test = 0;
@@ -890,7 +917,7 @@ sub writemac {
#####################################
# Get adapter mac
#####################################
$value = format_mac( $value );
#$value = format_mac( $value );
@fields = split /\s+/, $value;
$mac = $fields[2];
+1 -1
View File
@@ -411,7 +411,7 @@ sub format_output {
# Strip errors for results
#######################################
my @val = grep( !/^#.*: ERROR /, @$values );
xCAT::PPCdb::add_ppc( $hwtype, \@val );
xCAT::PPCdb::add_ppc( $hwtype, \@val ,'','',"PPC");
}
###########################################
+1 -1
View File
@@ -1913,7 +1913,7 @@ sub xCATdB {
$profile,
$parent );
return( xCAT::PPCdb::add_ppc( $hwtype, [$values] ));
return( xCAT::PPCdb::add_ppc( $hwtype, [$values],'','',"PPC" ));
}
return undef;
}
+348 -30
View File
@@ -277,7 +277,7 @@ sub get_nodes_nic_attrs{
my $nodes = shift;
my $nicstab = xCAT::Table->new( 'nics');
my $entry = $nicstab->getNodesAttribs($nodes, ['nictypes', 'nichostnamesuffixes', 'nichostnameprefixes', 'niccustomscripts', 'nicnetworks', 'nicips']);
my $entry = $nicstab->getNodesAttribs($nodes, ['nictypes', 'nichostnamesuffixes', 'nichostnameprefixes', 'niccustomscripts', 'nicnetworks', 'nicips', 'nicextraparams']);
my %nicsattrs;
my @nicattrslist;
@@ -361,6 +361,19 @@ sub get_nodes_nic_attrs{
$nicsattrs{$node}{$nicattrs[0]}{'ip'} = $nicattrs[1];
}
}
if($entry->{$node}->[0]->{'nicextraparams'}){
@nicattrslist = split(",", $entry->{$node}->[0]->{'nicextraparams'});
foreach (@nicattrslist){
my @nicattrs;
if ($_ =~ /!/) {
@nicattrs = split("!", $_);
} else {
@nicattrs = split(":", $_);
}
$nicsattrs{$node}{$nicattrs[0]}{'extraparams'} = $nicattrs[1];
}
}
}
return \%nicsattrs;
@@ -653,6 +666,39 @@ sub get_all_cecs
}
}
#-------------------------------------------------------------------------------
=head3 get_all_lparids
Description : Get all LPAR ids in system.
Arguments : ref of all cecs
Returns : ref for LPAR ids hash.
Example :
my $arrayref = xCAT::ProfiledNodeUtils->get_all_lparids(\%allcecs);
=cut
#-------------------------------------------------------------------------------
sub get_all_lparids
{
my $class= shift;
my $cecsref = shift;
my %allcecs = %$cecsref;
my %lparids;
my $ppctab = xCAT::Table->new('ppc');
foreach my $cec (keys %allcecs) {
my @ids = $ppctab->getAllAttribsWhere("hcp = '$cec'", 'id');
foreach (@ids) {
if ( $_->{'id'} ){
$lparids{$cec}{$_->{'id'}} = 0;
}
}
}
$ppctab->close();
return \%lparids;
}
#-------------------------------------------------------------------------------
=head3 is_discover_started
@@ -690,6 +736,7 @@ sub get_nodes_profiles
{
my $class = shift;
my $nodelistref = shift;
my $groupnamemode = shift;
my %profile_dict;
my $nodelisttab = xCAT::Table->new('nodelist');
@@ -709,8 +756,12 @@ sub get_nodes_profiles
if ( $idx == 2 ){
# The group string will like @NetworkProfile_<profile name>
# So, index should +3, 2 for '__', 1 for _.
my $append_index = length($profile) + 3;
$profile_dict{$_}{$profile} = substr $group, $append_index;
if ($groupnamemode) {
$profile_dict{$_}{$profile} = $group;
} else{
my $append_index = length($profile) + 3;
$profile_dict{$_}{$profile} = substr $group, $append_index;
}
last;
}
}
@@ -739,7 +790,7 @@ sub get_imageprofile_prov_method
my $nodetypestab = xCAT::Table->new('nodetype');
my $entry = ($nodetypestab->getAllAttribsWhere("node = '$imgprofilename'", 'ALL' ))[0];
my $osimgname = $entry->{'provmethod'};
return $entry->{'provmethod'};
#my $osimgtab = xCAT::Table->new('osimage');
#my $osimgentry = ($osimgtab->getAllAttribsWhere("imagename = '$osimgname'", 'ALL' ))[0];
@@ -800,16 +851,20 @@ sub check_profile_consistent{
}
}
# Profile consistent keys, arch=>netboot, mgt=>nictype
my %profile_dict = ('x86' => 'xnba','x86_64' => 'xnba', 'ppc64' => 'yaboot',
'fsp' => 'FSP', 'ipmi' => 'BMC');
# Get Imageprofile arch
my $nodetypetab = xCAT::Table->new('nodetype');
my $nodetypeentry = $nodetypetab->getNodeAttribs($imageprofile, ['arch']);
my $nodetypeentry = $nodetypetab->getNodeAttribs($imageprofile, ['os','arch']);
my $os = $nodetypeentry->{'os'};
my $arch = $nodetypeentry->{'arch'};
$nodetypetab->close();
# Get Imageprofile pkgdir
my $osdistroname = $os . "-" . $arch;
my $osdistrotab = xCAT::Table->new('osdistro');
my $osdistroentry = ($osdistrotab->getAllAttribsWhere("osdistroname = '$osdistroname'", 'ALL' ))[0];
my $pkgdir = $osdistroentry->{'dirpaths'};
$osdistrotab->close();
# Get networkprofile netboot and installnic
my $noderestab = xCAT::Table->new('noderes');
my $noderesentry = $noderestab->getNodeAttribs($networkprofile, ['netboot', 'installnic']);
@@ -841,16 +896,33 @@ sub check_profile_consistent{
my $nodetype = undef;
$nodetype = $ntentry->{'nodetype'} if ($ntentry->{'nodetype'});
$ppctab->close();
# Checking whether netboot initrd image for Ubuntu ppc64
# This image should be downloaded from internet
if ($arch =~ /ppc64/i and $os =~ /ubuntu/i and !(-e "$pkgdir/install/netboot/initrd.gz")){
return 0, "The netboot initrd is not found in $pkgdir/install/netboot, please download it firstly.";
}
# Check if exists provision network
if (not ($installnic and exists $netprofile_nicshash{$installnic}{"network"})){
return 0, "Provisioning network not defined for network profile."
}
# Remove check mechanism about arch and netboot attribute
# Attribute 'neboot' will be generated based on arch, management method, os
# Profile consistent keys, arch=>netboot, mgt=>nictype
#my $ppc_netboot = 'yaboot';
#if( $os =~ /rhels7/ ){
# $ppc_netboot = 'grub2';
#}
#my %profile_dict = ('x86' => 'xnba','x86_64' => 'xnba', 'ppc64' => $ppc_netboot,
# 'ppc64el' => $ppc_netboot,
# 'fsp' => 'FSP', 'ipmi' => 'BMC');
# Check if imageprofile is consistent with networkprofile
if ($profile_dict{$arch} ne $netboot) {
return 0, "Imageprofile's arch is not consistent with networkprofile's netboot."
}
#if ($profile_dict{$arch} ne $netboot) {
# return 0, "Imageprofile's arch is not consistent with networkprofile's netboot."
#}
# Check if networkprofile is consistent with hardwareprofile
if (not $hardwareprofile) { # Not define hardwareprofile
@@ -860,29 +932,29 @@ sub check_profile_consistent{
return 0, "$nictype networkprofile must use with hardwareprofile.";
}
}
if ($mgt eq 'vm')
{
return 1, "";
}
my %mgt_dict = ('fsp' => 'FSP', 'ipmi' => 'BMC', 'kvm' => '');
# For nodetype is lpar node, not need to check the nictype as it is not required for lpar node
if (not $nictype and $mgt and $nodetype ne 'lpar' ) {
# define hardwareprofile, not define fsp or bmc networkprofile, and the node type is not lpar
return 0, "$profile_dict{$mgt} hardwareprofile must use with $profile_dict{$mgt} networkprofile.";
if ($mgt eq 'vm') {
return 1, "";
}
if ($profile_dict{$mgt} ne $nictype and $nodetype ne 'lpar') {
# Networkprofile's nictype is not consistent with hadrwareprofile's mgt, and the node type is not lpar
return 0, "Networkprofile's nictype is not consistent with hardwareprofile's mgt.";
if ($nodetype eq 'lpar') {
if ($nictype) {
# Can not associate FSP/BMC network if the node type is lpar
return 0, "The node with hardware type $nodetype can not use with $nictype networkprofile.";
}
return 1, ""
}
if ($nodetype eq 'lpar' and $nictype eq 'FSP')
{
# can not associate FSP network if the node type is lpar
return 0, "The node with hardware type $nodetype can not use with $nictype networkprofile.";
if ($mgt and $mgt_dict{$mgt} ne $nictype) {
my $errmsg = "$mgt hardwareprofile must use with $mgt_dict{$mgt} networkprofile.";
if ( $mgt eq 'kvm' ) {
$errmsg = "$mgt hardwareprofile must use with non-BMC and non-FSP networkprofile."
}
return 0, $errmsg;
}
return 1, "";
}
@@ -1144,3 +1216,249 @@ sub check_nicips{
return (0, \%nics_hash, "");
}
#-------------------------------------------------------------------------------
=head3 gen_chain_for_profiles
Description: Generate a chain string based on Network/Hardware/Image profiles.
Arguments: $profiles_hash: The reference for profiles hash.
For example:
$profiles_hash = { 'HardwareProfile' => 'IBM_NeXtScale_M4',
'ImageProfile' => 'rhels6.5-x86_64-stateful-compute',
'NetworkProfile' => 'default_network_profile',
}
$hw_reconfig: the flag shows whether we need re-configure all hardware
relative settings or not: like runcmds, runimg...etc
Returns: ($retcode, $chain)
$retcode = 1. Generate chain failed, $chain stands for error message.
$retcode = 0. Generate chain OK. $chain stands for the chain string.
=cut
#-------------------------------------------------------------------------------
sub gen_chain_for_profiles{
my $class = shift;
my $profiles_hashref = shift;
my $hw_reconfig = shift;
my $final_chain = "";
if (! $profiles_hashref){
return (1, "Missing parameter for gen_chain_for_profiles.");
}
# A node must have at least imageprofile and network profile.
unless (defined $profiles_hashref->{'ImageProfile'}){
return (1, "No imageprofile specified in profiles hash.");
}
unless (defined $profiles_hashref->{'NetworkProfile'}){
return (1, "No networkprofile specified in profiles hash.");
}
my $hwprofile = $profiles_hashref->{'HardwareProfile'};
my $imgprofile = $profiles_hashref->{'ImageProfile'};
my $netprofile = $profiles_hashref->{'NetworkProfile'};
# Get node's provisioning method
my $provmethod = xCAT::ProfiledNodeUtils->get_imageprofile_prov_method($imgprofile);
unless ($provmethod ){
return (1, "Can not get provisioning method for image profile $imgprofile");
}
my $netprofileattr = xCAT::ProfiledNodeUtils->get_nodes_nic_attrs([$netprofile])->{$netprofile};
unless ($netprofileattr){
return (1, "Can not get attributes for network profile $netprofile");
}
$final_chain = 'osimage='.$provmethod.":--noupdateinitrd";
# get the chain attribute from hardwareprofile and insert it to node.
if (defined $hwprofile and $hwprofile and $hw_reconfig){
my $chaintab = xCAT::Table->new('chain');
my $chain = $chaintab->getNodeAttribs($hwprofile, ['chain']);
if (exists $chain->{'chain'}) {
my $hw_chain = $chain->{'chain'};
$final_chain = $hw_chain.',osimage='.$provmethod.":--noupdateinitrd";
}
}
#run bmcsetups.
if ((exists $netprofileattr->{"bmc"}) and $hw_reconfig){
if (index($final_chain, "runcmd=bmcsetup") == -1){
$final_chain = 'runcmd=bmcsetup,'.$final_chain.':reboot4deploy';
}
else{
$final_chain = $final_chain.':reboot4deploy';
}
}
return (0, $final_chain);
}
#-------------------------------------------------------------------------------
=head3 get_all_vmhosts
Description : Get all vm hosts/hypervisor from DB.
Arguments : N/A
Returns : ref for vm hosts/hypervisor hash.
Example :
my $hashref = xCAT::ProfiledNodeUtils->get_all_vmhosts();
=cut
#-------------------------------------------------------------------------------
sub get_all_vmhosts
{
my %vmhostshash;
my $nodelisttab = xCAT::Table->new('nodelist');
# groups like '__Hypervisor_pkvm' means this node is Power KVM hypervisor
my @vmhosts = $nodelisttab->getAllAttribsWhere("groups like '%__Hypervisor_kvm%'", 'node');
foreach (@vmhosts) {
if($_->{'node'}) {
$vmhostshash{$_->{'node'}} = 1;
}
}
$nodelisttab->close();
# Return the ref accordingly
return \%vmhostshash;
}
#-------------------------------------------------------------------------------
=head3 get_netboot_attr
Description : Get netboot attribute for node
Arguments : $imageprofile - image profile name, mandatory. e.g. "__ImageProfile_rhels7.0-x86_64-stateful-mgmtnode"
$hardwareprofile - harware profile name, optional. e.g. "__HardwareProfile_IBM_System_x_M4"
Returns : (returncode, netboot)
returncode=0 - can not get netboot value,netboot is the error message
returncode=1 - can get netboot value,netboot is the right value
=cut
#-------------------------------------------------------------------------------
sub get_netboot_attr{
my $class = shift;
my $imageprofile = shift;
my $hardwareprofile = shift;
my $netboot;
my @nodegrps = xCAT::TableUtils->list_all_node_groups();
unless(grep{ $_ eq $imageprofile} @nodegrps)
{
return 0, "Image profile not defined in DB."
}
$imageprofile =~ s/^__ImageProfile_//;
if ($hardwareprofile){
unless(grep{ $_ eq $hardwareprofile} @nodegrps)
{
return 0, "Hardware profile not defined in DB."
}
$hardwareprofile =~ s/^__HardwareProfile_//;
}
else
{
$hardwareprofile = '*';
}
# Get os name, os major version, osarch
my $osimage_tab = xCAT::Table->new('osimage');
my $osimage_tab_entry = $osimage_tab->getAttribs({'imagename'=> $imageprofile},('osdistroname'));
my $osdistroname = $osimage_tab_entry->{'osdistroname'};
$osimage_tab->close();
my $osdistro_tab = xCAT::Table->new('osdistro');
my $osdistro_tab_entry = $osdistro_tab->getAttribs({'osdistroname'=> $osdistroname},('basename', 'majorversion', 'arch'));
my $os_name = $osdistro_tab_entry->{'basename'};
my $os_major_version = $osdistro_tab_entry->{'majorversion'};
my $os_arch = $osdistro_tab_entry->{'arch'};
$osdistro_tab->close;
# Treate os name rhel,centos,rhelhpc same as rhels
if ($os_name eq 'centos' || $os_name eq 'rhelhpc' || $os_name eq 'rhel')
{
$os_name = 'rhels';
}
# Treate arch ppc64el same as ppc64le,x86 same as x86_64
if ($os_arch eq 'ppc64el')
{
$os_arch = 'ppc64le';
}elsif ($os_arch eq 'x86')
{
$os_arch = 'x86_64';
}
# Rule for netboot attribute.If update the rule,just update %netboot_dict and @condition_array
# It's sequence sensitive: os arch -> os name -> os major version -> hardware profile
# Priority | Arch | OS Name | OS Major Version | Hardware Profile | Noderes.netboot |
# 1 | x86_64/x86 | * | * | * | xnba |
# 2 | ppc64 | rhels | 7 | * | grub2 |
# 3 | | * | * | * | yaboot |
# 4 | ppc64le/el | * | * | IBM_PowerNV | petiboot |
# 5 | | * | * | * | grub2 |
# arch osname version hardware netboot
my %netboot_dict = ( 'x86_64' => 'xnba',
'ppc64' => {
'rhels' => {
'7' => 'grub2',
'*' => 'yaboot',
},
'*' => 'yaboot',
},
'ppc64le' => {
'*' => {
'*' => {
'IBM_PowerNV' => 'petiboot',
'*' => 'grub2',
},
},
},
);
my $condition_array_ref = [$os_arch, $os_name, $os_major_version, $hardwareprofile];
$netboot = cal_netboot(\%netboot_dict, $condition_array_ref);
if($netboot eq '0')
{
return 0, "Can not get the netboot attribute";
}
else
{
return 1, $netboot;
}
}
#-------------------------------------------------------------------------------
=head3 cal_netboot
Description : Calculate netboot attribute by conditions recursively, internal use.
Arguments : $netboot_dict_ref
$condition_array_ref
Returns : netboot
returncode=0 - can not get netboot value
=cut
#-------------------------------------------------------------------------------
sub cal_netboot{
my $netboot_dict_ref = shift;
my $condition_array_ref = shift;
my $condition_array_len = scalar @$condition_array_ref;
if( $condition_array_len == 0 ){
return 0;
}
my $condition = shift @$condition_array_ref;
if( (exists($netboot_dict_ref->{$condition})) || (exists($netboot_dict_ref->{'*'})) )
{
if(!exists($netboot_dict_ref->{$condition}))
{
$condition = '*';
}
if(ref($netboot_dict_ref->{$condition}) eq 'HASH')
{
if($condition_array_len > 1)
{
return cal_netboot($netboot_dict_ref->{$condition}, $condition_array_ref);
}
else
{
return 0;
}
}
else
{
return $netboot_dict_ref->{$condition};
}
}
else
{
return 0;
}
}
+3
View File
@@ -116,6 +116,9 @@ sub dodiscover {
send_message($args{reqcallback}, 0, "The rarge is too large and may be time consuming. Broadcast is recommended.");
}
}
#no need to check site.nmapoptions because it specifilly
# uses T5 for certain performance requirement.
`/usr/bin/nmap $range -sn -PE -n --send-ip -T5 `;
my $nmapres = `/usr/bin/nmap $range -PE -p 427 -n --send-ip -T5 `;
foreach my $line (split(/\n\n/,$nmapres)) {
+68 -10
View File
@@ -650,7 +650,8 @@ sub decode_spd {
8 => "DDR2 SDRAM",
9 => "DDR2 SDRAM FB-DIMM",
10 => "DDR2 SDRAM FB-DIMM PROBE",
11 => "DDR3 SDRAM"
11 => "DDR3 SDRAM",
12 => "DDR4 SDRAM",
);
my %modtypes = (
@@ -668,33 +669,35 @@ sub decode_spd {
1333 => 10600,
1600 => 12800,
1867 => 14900,
2132 => 17000,
2133 => 17000,
2134 => 17000,
);
my %ddr3modcap = (
my %ddrmodcap = (
0 => 256,
1 => 512,
2 => 1024,
3 => 2048,
4 => 4096,
5 => 8192,
6 => 16384
6 => 16384,
7 => 32768,
);
my %ddr3devwidth = (
my %ddrdevwidth = (
0 => 4,
1 => 8,
2 => 16,
3 => 32
);
my %ddr3ranks = (
my %ddrranks = (
0 => 1,
1 => 2,
2 => 3,
3 => 4
);
my %ddr3buswidth = (
my %ddrbuswidth = (
0 => 8,
1 => 16,
2 => 32,
@@ -728,10 +731,10 @@ sub decode_spd {
$rethash->{product}->{name} .= " ECC";
}
$rethash->{product}->{name}.=" ".$modtypes{$spd[3]&0x0f};
my $sdramcap=$ddr3modcap{$spd[4]&0xf};
my $buswidth=$ddr3buswidth{$spd[8]&0b111};
my $sdramwidth=$ddr3devwidth{$spd[7]&0b111};
my $ranks = $ddr3ranks{($spd[7]&0b111000)>>3};
my $sdramcap=$ddrmodcap{$spd[4]&0xf};
my $buswidth=$ddrbuswidth{$spd[8]&0b111};
my $sdramwidth=$ddrdevwidth{$spd[7]&0b111};
my $ranks = $ddrranks{($spd[7]&0b111000)>>3};
my $capacity = $sdramcap/8*$buswidth/$sdramwidth*$ranks;
@@ -769,6 +772,61 @@ sub decode_spd {
# $rawspd .= sprintf("%02X ",$_);
#}
#push @{$rethash->{product}->{extra}},$rawspd;
} elsif ($spd[2] == 12) { #DDR4 spec applies
# spd[125] spd[18] spd[18is sdram min cycle time .. spd125 is fine offset for min time
# mtb and ftb are fixed in ddr4 spd spec.. mtb is always 0.125 ns and ftb is always 0.001 ns
my $speed;
my $clock;
if ($spd[17] == 0) {
my $fineoffset = $spd[125];
if ($fineoffset & 0b10000000) {
#negative value, twos complement
$fineoffset = 0-(($fineoffset ^ 0xff) + 1);
}
$clock = int(2/((0.125*$spd[18] + $fineoffset*0.001)*0.001));
$speed = $speedfromclock{$clock};
unless ($speed) { $speed = "UNKNOWN"; }
} else { # this would mean a different MTB and FTB than spec indicated..
$clock = "UNKNOWN";
$speed = "UNKNOWN";
}
$rethash->{product}->{name}="PC4-".$speed." ($clock MT/s)";
if ($spd[13]&0b11000 == 0b1000) {
$rethash->{product}->{name} .= " ECC";
}
$rethash->{product}->{name}.=" ".$modtypes{$spd[3]&0x0f};
my $sdramcap=$ddrmodcap{$spd[4]&0xf};
my $buswidth=$ddrbuswidth{$spd[13]&0b111};
my $sdramwidth=$ddrdevwidth{$spd[12]&0b111};
my $ranks = $ddrranks{($spd[12]&0b111000)>>3};
my $capacity = $sdramcap/8*$buswidth/$sdramwidth*$ranks;
if ($capacity < 1024) {
$capacity = $capacity."MB";
} else {
$capacity = ($capacity/1024)."GB";
}
$rethash->{product}->{name} = $capacity." ".$rethash->{product}->{name};
$rethash->{product}->{manufacturer} = decode_manufacturer($spd[320],$spd[321]);
$rethash->{product}->{buildlocation} = sprintf("%02x",$spd[322]);
if ($spd[120] != 0 or $spd[121] != 0) {
$rethash->{product}->{builddate} = sprintf("Week %x of 20%02x",$spd[323],$spd[324]);
}
foreach (@spd[329..348]) {
if ($_ > 126 or $_ < 32) {
$rethash->{product}->{model}="Malformed SPD";
}
}
unless ($rethash->{product}->{model}) {
$rethash->{product}->{model}=pack("C*",@spd[329..348]);
}
#my $rawspd="SPD Dump: ";
#foreach (@spd) {
# $rawspd .= sprintf("%02X ",$_);
#}
#push @{$rethash->{product}->{extra}},$rawspd;
} else {
$rethash->{product}->{model}="Unrecognized SPD";
}
+56 -13
View File
@@ -542,7 +542,7 @@ networks => {
netname => 'Name used to identify this network definition.',
net => 'The network address.',
mask => 'The network mask.',
mgtifname => 'The interface name of the management/service node facing this network. !remote! indicates a non-local network for relay DHCP.',
mgtifname => 'The interface name of the management/service node facing this network. !remote!<nicname> indicates a non-local network on a specific nic for relay DHCP.',
gateway => 'The network gateway. It can be set to an ip address or the keyword <xcatmaster>, the keyword <xcatmaster> indicates the cluster-facing ip address configured on this management node or service node. Leaving this field blank means that there is no gateway for this network.',
dhcpserver => 'The DHCP server that is servicing this network. Required to be explicitly set for pooled service node operation.',
tftpserver => 'The TFTP server that is servicing this network. If not set, the DHCP server is assumed.',
@@ -643,14 +643,14 @@ noderes => {
descriptions => {
node => 'The node name or group name.',
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, grub2 for RHEL7 on Power. Notice: yaboot is not supported from rhels7 on Power,use grub2 instead',
netboot => 'The type of network booting to use for this node. Valid values: pxe or xnba for x86* architecture, yaboot for POWER architecture, grub2-tftp and grub2-http for RHEL7 on Power and all the os deployment on Power LE. Notice: yaboot is not supported from rhels7 on Power,use grub2-tftp or grub2-http instead, the difference between the 2 is the file transfer protocol(i.e, http or tftp)',
tftpserver => 'The TFTP server for this node (as known by this node). If not set, it defaults to networks.tftpserver.',
tftpdir => 'The directory that roots this nodes contents from a tftp and related perspective. Used for NAS offload by using different mountpoints.',
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.',
primarynic => 'The network adapter on the node that will be used for xCAT management, the primarynic 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. Default is eth0.',
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. If primarynic is not set too, the keyword "mac" will be used as default.',
primarynic => 'This attribute will be deprecated. All the used network interface will be determined by installnic. The network adapter on the node that will be used for xCAT management, the primarynic 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. Default is eth0.',
discoverynics => 'If specified, force discovery to occur on specific network adapters only, regardless of detected connectivity. Syntax can be simply "eth2,eth3" to restrict discovery to whatever happens to come up as eth2 and eth3, or by driver name such as "bnx2:0,bnx2:1" to specify the first two adapters managed by the bnx2 driver',
cmdinterface => 'Not currently used.',
xcatmaster => 'The hostname of the xCAT service node (as known by this node). This acts as the default value for nfsserver and tftpserver, if they are not set. If xcatmaster is not set, the node will use whoever responds to its boot request as its master. For the directed bootp case for POWER, it will use the management node if xcatmaster is not set.',
@@ -728,7 +728,7 @@ osimage => {
description => 'OS Image Description',
provmethod => 'The provisioning method for node deployment. The valid values are install, netboot,statelite,boottarget,dualboot,sysclone. If boottarget is set, you must set linuximage.boottarget to the name of the boottarget definition. It is not used by AIX.',
rootfstype => 'The filesystem type for the rootfs is used when the provmethod is statelite. The valid values are nfs or ramdisk. The default value is nfs',
osdistroname => 'The name of the OS distro definition. This attribute can be used to specify which OS distro to use, instead of using the osname,osvers,and osarch attributes.',
osdistroname => 'The name of the OS distro definition. This attribute can be used to specify which OS distro to use, instead of using the osname,osvers,and osarch attributes. For *kit commands, the attribute will be used to read the osdistro table for the osname, osvers, and osarch attributes. If defined, the osname, osvers, and osarch attributes defined in the osimage table will be ignored.',
osupdatename => 'A comma-separated list of OS distro updates to apply to this osimage.',
cfmdir => 'CFM directory name for PCM. Set to /install/osimages/<osimage name>/cfmdir by PCM. ',
profile => 'The node usage category. For example compute, service.',
@@ -756,9 +756,9 @@ linuximage => {
boottarget => 'The name of the boottarget definition. When this attribute is set, xCAT will use the kernel, initrd and kernel params defined in the boottarget definition instead of the default.',
addkcmdline=> 'User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. This attribute is ignored if linuximage.boottarget is set.',
pkglist => 'The fully qualified name of the file that stores the distro packages list that will be included in the image. Make sure that if the pkgs in the pkglist have dependency pkgs, the dependency pkgs should be found in one of the pkgdir',
pkgdir => 'The name of the directory where the distro packages are stored. It could be set multiple paths.The multiple paths must be seperated by ",". The first path in the value of osimage.pkgdir must be the OS base pkg dir path, such as pkgdir=/install/rhels6.2/x86_64,/install/updates . In the os base pkg path, there are default repository data. And in the other pkg path(s), the users should make sure there are repository data. If not, use "createrepo" command to create them. ',
pkgdir => 'The name of the directory where the distro packages are stored. It could be set multiple paths.The multiple paths must be seperated by ",". The first path in the value of osimage.pkgdir must be the OS base pkg dir path, such as pkgdir=/install/rhels6.2/x86_64,/install/updates . In the os base pkg path, there are default repository data. And in the other pkg path(s), the users should make sure there are repository data. If not, use "createrepo" command to create them. For ubuntu, multiple mirrors can be specified in the pkgdir attribute, the mirrors must be prefixed by the protocol(http/ssh) and delimited with "," between each other.',
otherpkglist => 'The fully qualified name of the file that stores non-distro package lists that will be included in the image.',
otherpkgdir => 'The base directory where the non-distro packages are stored.',
otherpkgdir => 'The base directory where the non-distro packages are stored. Only 1 local directory supported at present.',
exlist => 'The fully qualified name of the file that stores the file names and directory names that will be excluded from the image during packimage command. It is used for diskless image only.',
postinstall => 'The fully qualified name of the script file that will be run at the end of the genimage command. It is used for diskless image only.',
rootimgdir => 'The directory name where the image is stored. It is generally used for diskless image. it also can be used in sysclone environment to specify where the image captured from golden client is stored. in sysclone environment, rootimgdir is generally assigned to some default value by xcat, but you can specify your own store directory. just one thing need to be noticed, wherever you save the image, the name of last level directory must be the name of image. for example, if your image name is testimage and you want to save this image under home directoy, rootimgdir should be assigned to value /home/testimage/',
@@ -924,8 +924,11 @@ site => {
" -----------------\n".
"DATABASE ATTRIBUTES\n".
" -----------------\n".
" auditnosyslog: If set to 1, then commands will only be written to the auditlog table.\n".
" This attribute set to 1 and auditskipcmds=ALL means no logging of commands.\n".
" Default is to write to both the auditlog table and syslog.\n".
" auditskipcmds: List of commands and/or client types that will not be\n".
" written to the auditlog table.\n".
" written to the auditlog table and syslog. See auditnosyslog.\n".
" 'ALL' means all cmds will be skipped. If attribute is null, all\n".
" commands will be written.\n".
" clienttype:web would skip all commands from the web client\n".
@@ -943,6 +946,7 @@ site => {
" nodestatus: If set to 'n', the nodelist.status column will not be updated during\n".
" the node deployment, node discovery and power operations. The default is to update.\n\n".
" skiptables: Comma separated list of tables to be skipped by dumpxCATdb\n\n".
" skipvalidatelog: If set to 1, then getcredentials and getpostscripts calls will not be logged in syslog.\n\n".
" -------------\n".
"DHCP ATTRIBUTES\n".
" -------------\n".
@@ -991,6 +995,16 @@ site => {
" dnsupdaters: The value are \',\' separated string which will be added to the zone config\n".
" section. This is an interface for user to add configuration entries to\n".
" the zone sections in named.conf.\n\n".
" dnsinterfaces: The network interfaces DNS server should listen on. If it is the same\n".
" for all nodes, use a simple comma-separated list of NICs. To\n".
" specify different NICs for different nodes:\n".
" xcatmn|eth1,eth2;service|bond0.\n".
" In this example xcatmn is the name of the xCAT MN, and DNS there\n".
" should listen on eth1 and eth2. On all of the nodes in group\n".
" 'service' DNS should listen on the bond0 nic.\n".
" NOTE: if using this attribute to block certain interfaces, make sure\n".
" the ip maps to your hostname of xCAT MN is not blocked since xCAT needs to\n".
" use this ip to communicate with the local NDS server on MN.\n\n".
" -------------------------\n".
"HARDWARE CONTROL ATTRIBUTES\n".
" -------------------------\n".
@@ -1118,6 +1132,13 @@ site => {
" httpport: The port number that the booting/installing nodes should contact the\n".
" http server on the MN/SN on. It is your responsibility to configure\n".
" the http server to listen on that port - xCAT will not do that.\n\n".
" nmapoptions: Additional options for the nmap command. nmap is used in pping, \n".
" nodestat, xdsh -v and updatenode commands. Sometimes additional \n".
" performance tuning may be needed for nmap due to network traffic.\n".
" For example, if the network response time is too slow, nmap may not\n".
" give stable output. You can increase the timeout value by specifying \n".
" '--min-rtt-timeout 1s'. xCAT will append the options defined here to \n".
" the nmap command.\n\n".
" ntpservers: A comma delimited list of NTP servers for the cluster - often the\n".
" xCAT management node.\n\n".
" svloglocal: if set to 1, syslog on the service node will not get forwarded to the\n".
@@ -1399,7 +1420,7 @@ firmware => {
},
nics => {
cols => [qw(node nicips nichostnamesuffixes nichostnameprefixes nictypes niccustomscripts nicnetworks nicaliases comments disable)],
cols => [qw(node nicips nichostnamesuffixes nichostnameprefixes nictypes niccustomscripts nicnetworks nicaliases nicextraparams comments disable)],
keys => [qw(node)],
tablespace =>'XCATTBS16K',
table_desc => 'Stores NIC details.',
@@ -1436,6 +1457,12 @@ nics => {
Format: eth0!<alias list>,eth1!<alias1 list>|<alias2 list>
For multiple aliases per nic use a space-separated list.
For example: eth0!moe larry curly,eth1!tom|jerry',
nicextraparams => 'Comma-separated list of extra parameters that will be used for each NIC configuration.
If only one ip address is associated with each NIC:
<nic1>!<param1=value1 param2=value2>,<nic2>!<param3=value3>, for example, eth0!MTU=1500,ib0!MTU=65520 CONNECTED_MODE=yes.
If multiple ip addresses are associated with each NIC:
<nic1>!<param1=value1 param2=value2>|<param3=value3>,<nic2>!<param4=value4 param5=value5>|<param6=value6>, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes.
The xCAT object definition commands support to use nicextraparams.<nicname> as the sub attributes.',
comments => 'Any user-written notes.',
disable => "Set to 'yes' or '1' to comment out this row.",
},
@@ -1557,7 +1584,7 @@ discoverydata => {
method => 'The method which handled the discovery request. The method could be one of: switch, blade, profile, sequential.',
discoverytime => 'The last time that xCAT received the discovery message.',
arch => 'The architecture of the discovered node. e.g. x86_64.',
cpucount => 'The cpu number of the discovered node. e.g. 32.',
cpucount => 'The number of cores multiply by threads core supported for the discovered node. e.g. 192.',
cputype => 'The cpu type of the discovered node. e.g. Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz',
memory => 'The memory size of the discovered node. e.g. 198460852',
mtm => 'The machine type model of the discovered node. e.g. 786310X',
@@ -2362,7 +2389,11 @@ my @nodeattrs = (
tabentry => 'nics.nicaliases',
access_tabentry => 'nics.node=attr:node',
},
######################
{attr_name => 'nicextraparams',
tabentry => 'nics.nicextraparams',
access_tabentry => 'nics.node=attr:node',
},
#######################
# prodkey table #
######################
{attr_name => 'productkey',
@@ -3613,6 +3644,10 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs);
tabentry => 'kit.kitdeployparams',
access_tabentry => 'kit.kitname=attr:kitname',
},
{attr_name => 'kitdir',
tabentry => 'kit.kitdir',
access_tabentry => 'kit.kitname=attr:kitname',
},
);
#############################
@@ -3629,8 +3664,8 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs);
tabentry => 'kitrepo.kitname',
access_tabentry => 'kitrepo.kitreponame=attr:kitreponame',
},
{attr_name => 'osname',
tabentry => 'kitrepo.osname',
{attr_name => 'osbasename',
tabentry => 'kitrepo.osbasename',
access_tabentry => 'kitrepo.kitreponame=attr:kitreponame',
},
{attr_name => 'osmajorversion',
@@ -3698,6 +3733,10 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs);
tabentry => 'kitcomponent.kitpkgdeps',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
},
{attr_name => 'prerequisite',
tabentry => 'kitcomponent.prerequisite',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
},
{attr_name => 'driverpacks',
tabentry => 'kitcomponent.driverpacks',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
@@ -3710,6 +3749,10 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs);
tabentry => 'kitcomponent.postbootscripts',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
},
{attr_name => 'genimage_postinstall',
tabentry => 'kitcomponent.genimage_postinstall',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
},
{attr_name => 'exlist',
tabentry => 'kitcomponent.exlist',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
+9 -6
View File
@@ -10,12 +10,8 @@ BEGIN
# if AIX - make sure we include perl 5.8.2 in INC path.
# Needed to find perl dependencies shipped in deps tarball.
if ($^O =~ /^aix/i) {
use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi";
use lib "/usr/opt/perl5/lib/5.8.2";
use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi";
use lib "/usr/opt/perl5/lib/site_perl/5.8.2";
}
unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2));
}
use lib "$::XCATROOT/lib/perl";
use strict;
#-----------------------------------------------------------------------------
@@ -189,6 +185,13 @@ sub isServiceReq
if (!exists($servicehash->{'tftpserver'})) {
$servicehash->{'tftpserver'} = 1;
}
# On Ubuntu management node, we disabled the isc-dhcp-server in upstart,
# through file /etc/init/isc-dhcp-server.override, see bug 4399
# however, this causes a new problem, bug 4515
# the fix is to start dhcp server when starting xcatd
if (!exists($servicehash->{'dhcpserver'}) && xCAT::Utils->osver() =~ /ubuntu.*/i) {
$servicehash->{'dhcpserver'} = 1;
}
}
$servicenodetab->close;
+9 -1
View File
@@ -179,6 +179,10 @@ sub init_dbworker {
#setup signal in NotifHandler so that the cache can be updated
xCAT::NotifHandler::setup($$, 0);
# NOTE: There's a bug that sometimes the %SIG is cleaned up by accident, but we cannot figure out when and why
# this happens. The temporary fix is to backup the %SIG and recover it when necessary.
my %SIGbakup = %SIG;
while (not $exitdbthread) {
eval {
my @ready_socks = $clientset->can_read;
@@ -191,6 +195,7 @@ sub init_dbworker {
} else {
eval {
handle_dbc_conn($currcon,$clientset);
unless (%SIG && defined ($SIG{USR1})) { %SIG = %SIGbakup; }
};
if ($@) {
my $err=$@;
@@ -215,6 +220,9 @@ sub init_dbworker {
exit(0);
}
}
# sleep a while to make sure the client process has done
sleep 1.5;
close($dbworkersocket);
unlink($dbsockpath);
exit 0;
@@ -3834,7 +3842,7 @@ sub writeAllEntries
}
my $filename = shift;
my $fh;
my $rc;
my $rc = 0;
# open the file for write
unless (open($fh," > $filename")) {
my $msg="Unable to open $filename for write \n.";
+2 -5
View File
@@ -10,11 +10,8 @@ BEGIN
# if AIX - make sure we include perl 5.8.2 in INC path.
# Needed to find perl dependencies shipped in deps tarball.
if ($^O =~ /^aix/i) {
use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi";
use lib "/usr/opt/perl5/lib/5.8.2";
use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi";
use lib "/usr/opt/perl5/lib/site_perl/5.8.2";
}
unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2));
}
use lib "$::XCATROOT/lib/perl";
use strict;
+9 -5
View File
@@ -33,7 +33,7 @@ my %usage = (
LPAR(with HMC) specific:
rpower <noderange> [on|off|reset|stat|state|boot|of|sms|softoff]
CEC(using Direct FSP Management) specific:
rpower <noderange> [on|onstandby|off|stat|state|lowpower|resetsp]
rpower <noderange> [on|onstandby|off|stat|state|resetsp]
Frame(using Direct FSP Management) specific:
rpower <noderange> [stat|state|rackstandby|exit_rackstandby|resetsp]
LPAR(using Direct FSP Management) specific:
@@ -333,12 +333,16 @@ my %usage = (
renergy [-v | --version]
Power 6 server specific :
renergy noderange [-V] { all | { [savingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] } }
renergy noderange [-V] { {savingstatus}={on | off} | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
renergy noderange [-V] { all | { [savingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] } }
renergy noderange [-V] { {savingstatus}={on | off} | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
Power 7 server specific :
renergy noderange [-V] { all | { [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] [syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] [ffoTurbo] [ffoNorm] [ffovalue] } }
renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} | {fsavingstatus}={on | off} | {ffovalue}=MHZ | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
renergy noderange [-V] { all | { [savingstatus] [dsavingstatus] [cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin] [averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed] [syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] [ffoTurbo] [ffoNorm] [ffovalue] } }
renergy noderange [-V] { {savingstatus}={on | off} | {dsavingstatus}={on-norm | on-maxp | off} | {fsavingstatus}={on | off} | {ffovalue}=MHZ | {cappingstatus}={on | off} | {cappingwatt}=watt | {cappingperc}=percentage }
Power 8 server specific :
renergy noderange [-V] { all | [savingstatus] [dsavingstatus] [averageAC] [averageAChistory] [averageDC] [averageDChistory] [ambienttemp] [ambienttemphistory] [exhausttemp] [exhausttemphistory] [fanspeed] [fanspeedhistory] [CPUspeed] [CPUspeedhistory] [syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin] [ffoTurbo] [ffoNorm] [ffovalue]}
renergy noderange [-V] { savingstatus={on | off} | dsavingstatus={on-norm | on-maxp | off} | fsavingstatus={on | off} | ffovalue=MHZ }
BladeCenter specific :
For Management Modules:
+421 -8
View File
@@ -2162,7 +2162,72 @@ sub osver
my $line = '';
my @lines;
my $relfile;
if (-f "/etc/redhat-release")
if (-f "/etc/os-release"){
my $version;
my $version_id;
my $id;
my $id_like;
my $name;
my $prettyname;
my $verrel;
if (open($relfile,"<","/etc/os-release")) {
my @text = <$relfile>;
close($relfile);
chomp(@text);
#print Dumper(\@text);
foreach my $line (@text){
if($line =~ /^\s*VERSION=\"?([0-9\.]+).*/){
$version=$1;
}
if($line =~ /^\s*VERSION_ID=\"?([0-9\.]+).*/){
$version_id=$1;
}
if($line =~ /^\s*ID=\"?([0-9a-z\_\-\.]+).*/){
$id=$1;
}
if($line =~ /^\s*ID_LIKE=\"?([0-9a-z\_\-\.]+).*/){
$id_like=$1;
}
if($line =~ /^\s*NAME=\"?(.*)/){
$name=$1;
}
if($line =~ /^\s*PRETTY_NAME=\"?(.*)/){
$prettyname=$1;
}
}
}
$os=$id;
if (!$os and $id_like) {
$os=$id_like;
}
$verrel=$version;
if (!$verrel and $version_id) {
$verrel=$version_id;
}
if(!$name and $prettyname){
$name=$prettyname;
}
if($os =~ /rhel/ and $name =~ /Server/i){
$os="rhels";
}
if($verrel =~ /([0-9]+)\.?(.*)/) {
$ver=$1;
$rel=$2;
}
# print "$ver -- $rel";
}
elsif (-f "/etc/redhat-release")
{
open($relfile,"<","/etc/redhat-release");
$line = <$relfile>;
@@ -2269,8 +2334,10 @@ sub osver
close($relfile);
}
}
#print "xxxx $type === $rel \n";
if ( $type and $type =~ /all/ ) {
if ( $rel ) {
if ( $rel ne "") {
# print "xxx $os-$ver-$rel \n";
return( "$os" . "," . "$ver" . ".$rel" );
} else {
return( "$os" . "," . "$ver" );
@@ -3231,13 +3298,68 @@ sub noderangecontainsMn
return; # if no MN in the noderange, return nothing
}
# the MTM of P6 and P7 machine
my %MTM_P6P7 = (
# P6 systems
'7998-60X' => 1,
'7998-61X' => 1,
'7778-23X' => 1,
'8203-E4A' => 1,
'8204-E8A' => 1,
'8234-EMA' => 1,
'9117-MMA' => 1,
'9119-FHA' => 1,
# P7 systems
'8406-70Y' => 1,
'8406-71Y' => 1,
'7891-73X' => 1,
'7891-74X' => 1,
'8231-E2B' => 1,
'8202-E4B' => 1,
'8231-E2B' => 1,
'8205-E6B' => 1,
'8233-E8B' => 1,
'8236-E8C' => 1,
'9117-MMB' => 1,
'9179-MHB' => 1,
'9119-FHB' => 1,
);
#-----------------------------------------------------------------------------
=head3 isP6P7
Check whether a MTM is a P6 or P7 machine
Parameter: MTM of Power machine
=cut
#-------------------------------------------------------------------------------
sub isP6P7
{
my $class = shift;
my $mtm = shift;
if ($class !~ /Utils/) {
$mtm = $class;
}
if (defined $MTM_P6P7{$mtm} && $MTM_P6P7{$mtm} == 1) {
return 1;
}
return 0;
}
=head3 filter_nodes
##########################################################################
# Fliter the nodes to specific groups
# For specific command, figure out the node lists which should be handled by blade.pm, fsp.pm or ipmi.pm
# mp group: the nodes will be handled by blade.pm
# fsp group: the nodes will be handled by fsp.pm
# bmc group: the nodes will be handled by ipmi.pm
# mp group (argument: $mpnodes): the nodes will be handled by blade.pm
# fsp group (argument: $fspnodes): the nodes will be handled by fsp.pm
# bmc group (argument: $bmcnodes): the nodes will be handled by ipmi.pm
# For rspconfig network, the NGP ppc blade will be included in the group of mp, othewise in the fsp group
# For getmacs -D, the NGP ppc blade will be included in the group of common fsp, otherwise in the mp group
# For renergy command, NGP blade will be moved to mp group
@@ -3279,13 +3401,29 @@ sub filter_nodes{
if ($ipmitab) {
$ipmitabhash = $ipmitab->getNodesAttribs(\@nodes,['bmc']);
}
# get the node attributes from the nodehm table
my $nodehmhash;
my $nodehmtab = xCAT::Table->new("nodehm");
if ($nodehmtab) {
$nodehmhash = $nodehmtab->getNodesAttribs(\@nodes,['mgt']);
}
my (@mp, @ngpfsp, @ngpbmc, @commonfsp, @commonbmc, @unknow);
# get the node attributes from the nodetype table
my $nodetypehash;
my $nodetypetab = xCAT::Table->new("nodetype");
if ($nodetypetab) {
$nodetypehash = $nodetypetab->getNodesAttribs(\@nodes, ['arch']);
}
# get the node attributes from the vpd table
my $vpdhash,
my $vpdtab = xCAT::Table->new("vpd");
if ($vpdtab) {
$vpdhash = $vpdtab->getNodesAttribs(\@nodes, ['mtm']);
}
my (@mp, @ngpfsp, @ngpbmc, @commonfsp, @commonbmc, @unknow, @nonppcle, @p6p7);
# if existing in both 'mpa' and 'ppc', a ngp power blade
# if existing in both 'mpa' and 'ipmi', a ngp x86 blade
@@ -3319,9 +3457,21 @@ sub filter_nodes{
} elsif (defined ($ppctabhash->{$_}->[0]) && defined ($ppctabhash->{$_}->[0]->{'hcp'})) {
# common power node
push @commonfsp, $_;
# whether is a Power 8 or higher with FSP
if (defined ($vpdhash->{$_}->[0]) && defined ($vpdhash->{$_}->[0]->{'mtm'})) {
if (isP6P7($vpdhash->{$_}->[0]->{'mtm'})) {
push @p6p7, $_;
}
}
} elsif (defined ($ipmitabhash->{$_}->[0]) && defined ($ipmitabhash->{$_}->[0]->{'bmc'})) {
# common bmc node
push @commonbmc, $_;
# whether is a Power 8 or higher with FSP
if (defined ($nodetypehash->{$_}->[0]) && defined ($nodetypehash->{$_}->[0]->{'arch'})) {
if ($nodetypehash->{$_}->[0]->{'arch'} ne "ppc64le") {
push @nonppcle, $_;
}
}
} else {
push @unknow, $_;
}
@@ -3355,6 +3505,16 @@ sub filter_nodes{
push @{$mpnodes}, @ngpfsp;
}
} elsif ($cmd eq "renergy") {
# for renergy command, only the p6,p7 get to the general fsp.pm
# P8 and higher will get in the energy.pm
@{$fspnodes} = ();
push @{$fspnodes}, @p6p7;
# for rnergy command, only the non-ppcle nodes get to the general ipmi.pm
# ppcle of P8 and higher will get in the energy.pm
@{$bmcnodes} = ();
push @{$bmcnodes}, @nonppcle;
if (grep /^(relhistogram)/, @args) {
push @{$bmcnodes}, @ngpbmc;
} else {
@@ -3569,7 +3729,97 @@ sub gettimezone
}
1;
#--------------------------------------------------------------------------------
=head3 specialservicemgr
some special services cannot be processed in sysVinit, upstart and systemd framework, should be process here...
Arguments:
service name:
action: start/stop/restart/status/enable/disable
outputoption:
1: return a hashref with the keys:"retcode","retmsg"
otherwise: return retcode only
Returns:
a hashref if $outputoption is 1,the hash structure is:
{"retcode"=>(status code, 0 for running/active,1 for stopped/inactive,2 for failed)
"retmsg" =>(status string, running/active/stopped/inactive/failed)
}
the status code otherwise
retcode: 127 if the service specified is not processed
the exit code of the service operation if the service specified is processed
Globals:
none
Error:
none
Example:
my $ret=xCAT::Utils->specialservicemgr("firewall","start");
Comments:
none
=cut
#--------------------------------------------------------------------------------
sub specialservicemgr{
my $svcname=shift;
my $action=shift;
my $outputoption=shift;
my %ret;
$ret{retcode}=127;
if($svcname eq "firewall")
{
my $cmd="type -P SuSEfirewall2 >/dev/null 2>&1";
xCAT::Utils->runcmd($cmd,-1);
if($::RUNCMD_RC)
{
$ret{retcode}=127;
if(defined $outputoption and $outputoption == 1){
return \%ret;
}else{
return $ret{retcode};
}
}else{
if(($action eq "start") || ($action eq "stop"))
{
$cmd="SuSEfirewall2 $action";
}elsif($action eq "restart"){
$cmd="SuSEfirewall2 stop;SuSEfirewall2 start";
}elsif($action eq "disable"){
$cmd="SuSEfirewall2 off";
}elsif($action eq "enable"){
$cmd="SuSEfirewall2 on";
}elsif($action eq "status"){
$cmd="service SuSEfirewall2_setup status";
}else{
$ret{retcode}=127;
if(defined $outputoption and $outputoption == 1){
return \%ret;
}else{
return $ret{retcode};
}
}
$ret{retmsg}=xCAT::Utils->runcmd($cmd,-1);
$ret{retcode}= $::RUNCMD_RC;
if(defined $outputoption and $outputoption == 1){
return \%ret;
}else{
return $ret{retcode};
}
}
}
if(defined $outputoption and $outputoption == 1){
return \%ret;
}else{
return $ret{retcode};
}
}
#--------------------------------------------------------------------------------
@@ -3623,7 +3873,7 @@ sub servicemap{
"nfs" => ["nfsserver","nfs-server","nfs","nfs-kernel-server"],
"named" => ["named","bind9"],
"syslog" => ["syslog","syslogd","rsyslog"],
"firewall" => ["iptables","firewalld","SuSEfirewall2_setup","ufw"],
"firewall" => ["iptables","firewalld","ufw"],
"http" => ["apache2","httpd"],
"ntpserver" =>["ntpd","ntp"],
"mysql" => ["mysqld","mysql"],
@@ -3690,6 +3940,13 @@ sub startservice{
$svcname=shift;
}
my $retval=0;
$retval=specialservicemgr($svcname,"start");
if($retval != 127)
{
return $retval;
}
my $cmd="";
#for Systemd
my $svcunit=undef;
@@ -3754,6 +4011,16 @@ sub stopservice{
$svcname=shift;
}
my $retval=0;
$retval=specialservicemgr($svcname,"stop");
if($retval != 127)
{
return $retval;
}
my $cmd="";
my $svcunit=undef;
my $svcd=undef;
@@ -3816,6 +4083,14 @@ sub restartservice{
$svcname=shift;
}
my $retval=0;
$retval=specialservicemgr($svcname,"restart");
if($retval != 127)
{
return $retval;
}
my $cmd="";
my $svcunit=undef;
my $svcd=undef;
@@ -3886,6 +4161,18 @@ sub checkservicestatus{
my $outputoption=shift;
my $retval;
$retval=specialservicemgr($svcname,"status",1);
if($retval->{retcode} != 127)
{
if(defined $outputoption and $outputoption == 1 ){
return $retval;
}elsif(exists $retval->{retcode}){
return $retval->{retcode};
}
}
my $cmd="";
my $svcunit=undef;
my $svcd=undef;
@@ -3979,6 +4266,16 @@ sub enableservice{
$svcname=shift;
}
my $retval=0;
$retval=specialservicemgr($svcname,"enable");
if($retval != 127)
{
return $retval;
}
my $cmd="";
my $svcunit=undef;
my $svcd=undef;
@@ -4045,6 +4342,17 @@ sub disableservice{
$svcname=shift;
}
my $retval=0;
$retval=specialservicemgr($svcname,"disable");
if($retval != 127)
{
return $retval;
}
my $cmd="";
my $svcunit=undef;
my $svcjob=undef;
@@ -4084,4 +4392,109 @@ sub disableservice{
xCAT::Utils->runcmd($cmd, -1);
return $::RUNCMD_RC;
}
sub cleanup_for_powerLE_hardware_discovery {
my $host_node = shift;
if( $host_node =~ /xCAT::Utils/)
{
$host_node=shift;
}
my $pbmc_node = shift;
my $subreq = shift;
my $ipmitab = xCAT::Table->new("ipmi");
unless($ipmitab) {
xCAT::MsgUtils->message("S", "Discovery Error: can not open ipmi table.");
return;
}
my @nodes = ($host_node, $pbmc_node);
my $ipmihash = $ipmitab->getNodesAttribs(\@nodes, ['node', 'bmc', 'username', 'password']);
if ($ipmihash) {
my $new_bmc_ip = $ipmihash->{$host_node}->[0]->{bmc};
my $new_bmc_password = $ipmihash->{$host_node}->[0]->{password};
xCAT::MsgUtils->message("S", "Discovery info: configure password for pbmc_node:$pbmc_node.");
`rspconfig $pbmc_node password=$new_bmc_password`;
#if ($new_bmc_password) {
# xCAT::Utils->runxcmd(
# {
# command => ["rspconfig"],
# node => ["$pbmc_node"],
# arg => [ "password=$new_bmc_password" ],
# },
# $subreq, 0,1);
# if ($::RUNCMD_RC != 0) {
# xCAT::MsgUtils->message("S", "Discovery Error: configure password failed for FSP.");
# return;
# }
#}
xCAT::MsgUtils->message("S", "Discover info: configure ip:$new_bmc_ip for pbmc_node:$pbmc_node.");
`rspconfig $pbmc_node ip=$new_bmc_ip`;
#if($new_bmc_ip) {
# xCAT::Utils->runxcmd(
# {
# command => ["rspconfig"],
# node => ["$pbmc_node"],
# arg => [ "ip=$new_bmc_ip" ],
# },
# $subreq, 0,1);
# if ($::RUNCMD_RC != 0) {
# xCAT::MsgUtils->message("S", "Discovery Error: configure IP address failed for FSP.");
# return;
# }
#}
xCAT::MsgUtils->message("S", "Discovery info: remove pbmc_node:$pbmc_node.");
`rmdef $pbmc_node`;
#xCAT::Utils->runxcmd(
# {
# command => ["rmdef"],
# node => ["$pbmc_node"],
# },
# $subreq, 0,1);
}
}
#The parseMacTabEntry parses the mac table entry and return the mac address of nic in management network
#Arguments:
#macString : the string of mac table entry
#HostName : the hostname of the node
#The mac address is taken as installnic when:
#1. the mac addr does not have a suffix "!xxxx"
#2. the mac addr has a fuffix "!<the node name in xcat nodelist table>"
#The schema description of mac table is:
# mac: The mac address or addresses for which xCAT will manage static bindings for this node.
#This may be simply a mac address, which would be bound to the node name (such as "01:02:03:04:05:0E").
#This may also be a "|" delimited string of "mac address!hostname" format (such as "01:02:03:04:05:0E!node5|01:02:03:05:0F!node6-eth1").
sub parseMacTabEntry{
my $macString=shift;
if( $macString =~ /xCAT::Utils/) {
$macString=shift;
}
my $HostName=shift;
my $mac_ret;
my @macEntry=split(/\|/,$macString);
foreach my $mac_t (@macEntry){
if($mac_t =~ /!/){
if($mac_t =~ /(.+)!$HostName$/){
$mac_ret=$1;
}
}else{
$mac_ret=$mac_t;
}
}
if ($mac_ret) {
if ($mac_ret !~ /:/) {
$mac_ret =~ s/(..)(..)(..)(..)(..)(..)/$1:$2:$3:$4:$5:$6/;
}
}
return $mac_ret;
}
1;
+4
View File
@@ -67,12 +67,15 @@ require Exporter;
"1359576196.686790" => "rhels6.4", #ppc64
"1384196515.415715" => "rhels6.5", #x86_64
"1384198011.520581" => "rhels6.5", #ppc64
"1411733344.627228" => "rhels6.6", #x86_64
"1411733344.616389" => "rhels6.6", #ppc64
"1285193176.593806" => "rhelhpc6", #x86_64
"1305067719.718814" => "rhelhpc6.1",#x86_64
"1321545261.599847" => "rhelhpc6.2",#x86_64
"1339640148.070971" => "rhelhpc6.3",#x86_64
"1359576195.413831" => "rhelhpc6.4",#x86_64, RHEL ComputeNode
"1384196516.465862" => "rhelhpc6.5",#x86_64, RHEL ComputeNode
"1411733344.599861" => "rhelhpc6.6",#x86_64, RHEL ComputeNode
"1399449226.140088" => "rhelhpc7.0",#x86_64, RHEL ComputeNode
"1194015916.783841" => "fedora8",
"1194015385.299901" => "fedora8",
@@ -97,6 +100,7 @@ require Exporter;
"1390839789.062069" => "SL6.5", #x86_64 DVD ISO Install
"1394111947.452332" => "pkvm2.1", # ppc64, PowerKVM
"1413749127.352649" => "pkvm2.1.1", # ppc64, PowerKVM
);
my %numdiscs = (
"1156364963.862322" => 4,
-2
View File
@@ -614,8 +614,6 @@ sub punch2Reader {
my $out;
if ( $os =~ m/sles10/i ) {
$out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`;
} elsif ( $os =~ m/sles11/i ) {
$out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /usr/sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`;
} elsif ( $os =~ m/rhel/i ) {
$out = `ssh -o ConnectTimeout=5 $user\@$hcp "$sudo /usr/sbin/vmur punch $options -u $userId -r $srcFile -N $tgtFile"`;
} else {
@@ -103,7 +103,7 @@ else # assume Linux
fi
if [ ! -e $gpfsprofile.sh ]; then
echo 'export PATH=$PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.sh
echo 'setenv PATH $PATH:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
echo 'setenv PATH ${PATH}:/usr/lpp/mmfs/bin' > $gpfsprofile.csh
# Turn off LANG support since we did not install other msg catalogs
echo 'export LC_CTYPE=POSIX' >> $gpfsprofile.sh
echo 'setenv LC_CTYPE POSIX' >> $gpfsprofile.csh
+85 -35
View File
@@ -1,38 +1,88 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: xcat-openstack-baremetal
Source: <url://example.com>
Eclipse Public License - v 1.0
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2014 root <root@unknown>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
1. DEFINITIONS
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
-2
View File
@@ -1,2 +0,0 @@
xcat-openstack-baremetal_2.8.4-1_all.deb admin extra
xcat-openstack-baremetal_2.8.4-1_all.deb admin extra
@@ -1,201 +0,0 @@
dh_installdirs
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_installdirs
dh_install
dh_link
dh_installman
dh_compress
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
@@ -67,6 +67,13 @@ CONF.register_opts(pxe_opts, group='pxe')
CONF.register_opts(xcat_opts, group='xcat')
CONF.import_opt('use_ipv6', 'ironic.netconf')
REQUIRED_PROPERTIES = {
'pxe_deploy_kernel': _("UUID (from Glance) of the deployment kernel. "
"Required."),
'pxe_deploy_ramdisk': _("UUID (from Glance) of the ramdisk that is "
"mounted at boot time. Required."),
}
COMMON_PROPERTIES = REQUIRED_PROPERTIES
EM_SEMAPHORE = 'xcat_pxe'
def _check_for_missing_params(info_dict, param_prefix=''):
@@ -173,6 +180,8 @@ def _validate_glance_image(ctx, deploy_info):
class PXEDeploy(base.DeployInterface):
"""PXE Deploy Interface: just a stub until the real driver is ported."""
def get_properties(self):
return COMMON_PROPERTIES
def validate(self, task):
"""Validate the deployment information for the task's node.
@@ -34,8 +34,22 @@ CONF.import_opt('min_command_interval',
LOG = logging.getLogger(__name__)
VALID_BOOT_DEVICES = ['net', 'hd', 'cd', 'floppy', 'def', 'stat']
VALID_PRIV_LEVELS = ['ADMINISTRATOR', 'CALLBACK', 'OPERATOR', 'USER']
REQUIRED_PROPERTIES = {
'ipmi_address': _("IP address or hostname of the node. Required.")
}
OPTIONAL_PROPERTIES = {
'ipmi_password': _("password. Optional."),
'ipmi_priv_level': _("privilege level; default is ADMINISTRATOR. One of "
"%s. Optional.") % ', '.join(VALID_PRIV_LEVELS),
'ipmi_username': _("username; default is NULL user. Optional.")
}
COMMON_PROPERTIES = REQUIRED_PROPERTIES.copy()
COMMON_PROPERTIES.update(OPTIONAL_PROPERTIES)
CONSOLE_PROPERTIES = {
'ipmi_terminal_port': _("node's UDP port to connect to. Only required for "
"console access.")
}
TIMING_SUPPORT = None
@@ -298,6 +312,8 @@ class XcatPower(base.PowerInterface):
driver=self.__class__.__name__,
reason="Unable to locate usable xcat command in "
"the system path when checking xcat version")
def get_properties(self):
return COMMON_PROPERTIES
def validate(self, task):
"""Validate driver_info for xcat driver.
@@ -365,59 +381,6 @@ class XcatPower(base.PowerInterface):
if state != states.POWER_ON:
raise exception.PowerStateFailure(pstate=states.POWER_ON)
class VendorPassthru(base.VendorInterface):
@task_manager.require_exclusive_lock
def _set_boot_device(self, task, device, persistent=False):
"""Set the boot device for a node.
:param task: a TaskManager instance.
:param device: Boot device. One of [net, hd, cd, floppy, def, stat].
:param persistent: Whether to set next-boot, or make the change
permanent. Default: False.
:raises: InvalidParameterValue if an invalid boot device is specified
or if required ipmi parameters are missing.
:raises: IPMIFailure on an error from ipmitool.
"""
if device not in VALID_BOOT_DEVICES:
raise exception.InvalidParameterValue(_(
"Invalid boot device %s specified.") % device)
cmd = "rsetboot"
if persistent:
cmd = cmd + " options=persistent"
driver_info = _parse_driver_info(task.node)
try:
xcat_util.exec_xcatcmd(driver_info, cmd, device)
# TODO(deva): validate (out, err) and add unit test for failure
except xcat_exception.xCATCmdFailure:
LOG.error(_("rsetboot %(node)s %(device)s"),{'node':driver_info['xcat_node]'],
'device':device})
def validate(self, task, **kwargs):
""" run chdef command to config xcat node infomation """
method = kwargs['method']
if method == 'set_boot_device':
device = kwargs.get('device')
if device not in VALID_BOOT_DEVICES:
raise exception.InvalidParameterValue(_(
"Invalid boot device %s specified.") % device)
else:
raise exception.InvalidParameterValue(_(
"Unsupported method (%s) passed to xcat driver.")
% method)
driver_info = _parse_driver_info(task.node)
chdef_node(driver_info)
def vendor_passthru(self, task, **kwargs):
method = kwargs['method']
if method == 'set_boot_device':
return self._set_boot_device(
task,
kwargs.get('device'),
kwargs.get('persistent', False))
class IPMIShellinaboxConsole(base.ConsoleInterface):
"""A ConsoleInterface that uses ipmitool and shellinabox."""
@@ -429,6 +392,8 @@ class IPMIShellinaboxConsole(base.ConsoleInterface):
driver=self.__class__.__name__,
reason="Unable to locate usable xcat command in "
"the system path when checking xcat version")
def get_properties(self):
return COMMON_PROPERTIES
def validate(self, task):
"""Validate the Node console info.
@@ -23,8 +23,5 @@ class XCATBaremetalDriver(base.BaseDriver):
self.power = xcat_rpower.XcatPower()
self.console = ipmitool.IPMIShellinaboxConsole()
self.deploy = xcat_pxe.PXEDeploy()
self.pxe_vendor = pxe.VendorPassthru()
self.ipmi_vendor = ipmitool.VendorPassthru()
self.mapping = {'pass_deploy_info': self.pxe_vendor,
'set_boot_device': self.ipmi_vendor}
self.vendor = utils.MixinVendorInterface(self.mapping)
self.management = ipmitool.IPMIManagement()
self.vendor = pxe.VendorPassthru()
@@ -24,7 +24,24 @@ packages =
[entry_points]
ironic.drivers =
pxe_xcat = ironic.drivers.xcat:XCATBaremetalDriver
agent_ipmitool = ironic.drivers.agent:AgentAndIPMIToolDriver
agent_pyghmi = ironic.drivers.agent:AgentAndIPMINativeDriver
agent_ssh = ironic.drivers.agent:AgentAndSSHDriver
fake = ironic.drivers.fake:FakeDriver
fake_agent = ironic.drivers.fake:FakeAgentDriver
fake_iboot = ironic.drivers.fake:FakeIBootDriver
fake_ipminative = ironic.drivers.fake:FakeIPMINativeDriver
fake_ipmitool = ironic.drivers.fake:FakeIPMIToolDriver
fake_pxe = ironic.drivers.fake:FakePXEDriver
fake_seamicro = ironic.drivers.fake:FakeSeaMicroDriver
fake_ssh = ironic.drivers.fake:FakeSSHDriver
ilo = ironic.drivers.ilo:IloDriver
pxe_iboot = ironic.drivers.pxe:PXEAndIBootDriver
pxe_ipminative = ironic.drivers.pxe:PXEAndIPMINativeDriver
pxe_ipmitool = ironic.drivers.pxe:PXEAndIPMIToolDriver
pxe_seamicro = ironic.drivers.pxe:PXEAndSeaMicroDriver
pxe_ssh = ironic.drivers.pxe:PXEAndSSHDriver
pxe_xcat = ironic.drivers.xcat:XCATBaremetalDriver
[pbr]
autodoc_index_modules = True
+111
View File
@@ -0,0 +1,111 @@
#!/usr/bin/env python
"""
Usage: getslnodes.py [-h] [-v] [<hostname-match>]
Description:
Query your SoftLayer account and get attributes for each bare metal server.
The attributes can be piped to 'mkdef -z' to define the nodes into the xCAT
Database so that xCAT can manage them.
getslnodes requires a the .softlayer configuration file defined which can
be set by running "sl config setup" on the command line.
positional arguments:
hostname-match Select servers that include this partial hostname.
Optional:
-h, --help show this help message and exit
-v, --verbose display verbose output
"""
import sys
try:
import docopt
import pprint
import SoftLayer
except ImportError as e:
print 'Error: install missing python module before running this command: ' + str(e)
sys.exit(2)
def get_sl_servers():
# username, api_key, endpoint_url come from the .softlayer file
client = SoftLayer.Client()
mask = "hostname, fullyQualifiedDomainName, manufacturerSerialNumber, \
operatingSystem.id, operatingSystem.passwords.username, operatingSystem.passwords.password, \
remoteManagementAccounts.username, remoteManagementAccounts.password, remoteManagementComponent.ipmiIpAddress, \
primaryBackendNetworkComponent.primaryIpAddress, primaryBackendNetworkComponent.macAddress"
#
# If they specified hnmatch, it would be faster to have softlayer filter the response with something like:
# filter={'hardware': {'hostname': {'operation': '*= '+hostname}, 'domain': {'operation': '*= '+domain}}}
# But those 2 operations are ANDed together, so it will not work. And currently, filtering does not work on fullyQualifiedDomainName.
#
servers = client['Account'].getHardware(mask=mask)
return servers
def print_xcat_node_stanza(servers, hnmatch):
for server in servers:
if hnmatch and server['fullyQualifiedDomainName'].find(hnmatch) == -1:
continue
print "\n"+server['hostname']+":"
print "\tobjtype=node"
print "\tgroups=slnode,ipmi,all"
print "\tmgt=ipmi"
print "\tbmc="+server['remoteManagementComponent']['ipmiIpAddress']
# I have seen svrs with no remoteManagementAccounts entries
if len(server['remoteManagementAccounts']):
print "\tbmcusername="+server['remoteManagementAccounts'][0]['username']
print "\tbmcpassword="+server['remoteManagementAccounts'][0]['password']
print "\tip="+server['primaryBackendNetworkComponent']['primaryIpAddress']
print "\tmac="+server['primaryBackendNetworkComponent']['macAddress']
print "\tserial="+server['manufacturerSerialNumber']
print "\tnetboot=xnba"
print "\tarch=x86_64"
# Find the root or Administrator username and pw
username = None
password = None
for entry in server['operatingSystem']['passwords']:
if entry['username'] == 'root' or entry['username'] == 'Administrator':
# found it
username = entry['username']
password = entry['password']
break
elif not username:
# save the 1st entry, in case we never find root or Administrator
username = entry['username']
password = entry['password']
if username and password:
userStr = ", user:"+username+", pw:"+password
print "\tusercomment=hostname:"+server['fullyQualifiedDomainName']+userStr
if __name__ == '__main__':
try:
arguments = (docopt.docopt(__doc__, version="1.0"))
# print arguments
servers = get_sl_servers()
if arguments['--verbose']:
pprint.pprint(servers)
print_xcat_node_stanza(servers, arguments['<hostname-match>'])
except docopt.DocoptExit as e:
print e
except SoftLayer.exceptions.SoftLayerAPIError as e:
print e
sys.exit(1)
+42 -16
View File
@@ -63,26 +63,50 @@ sub addKernelParms {
# get node ip and add it to the kernel parms
my ($nic, $ip, $netmask, $network, $broadcast, $gateway, $mac) = getNodeIpInfo($args);
if (!$ip) { die "Error: could not find the NIC that would connect to the xCAT mgmt node's IP (".$args->{mnip}.").\n"; }
# if we are booting genesis, need to add the BOOTIF parm
my $bootif;
#if (defined($PROVMETHOD) && $PROVMETHOD eq 'sysclone') {
if ($args->{kernelpath} =~ m/genesis\.kernel\.x86_64/) {
$bootif = $mac;
# genesis case, add additional parms for sysclone or nodeset shell
my $bootif = $mac;
$bootif =~ s/:/-/g;
$bootif = "BOOTIF=01-$bootif";
}
#todo: if you are running genesis shell (nodeset <node> shell), this if-else will depend on the nodeset done before that.
# really should check for currstate=shell, or something like that
if (defined($PROVMETHOD) && $PROVMETHOD eq 'sysclone') {
# add additional parms for sysclone
# DEVICE=eth0 IPADDR=10.0.0.99 NETMASK=255.255.255.0 NETWORK=10.0.0.0 BROADCAST=10.0.0.255 GATEWAY=10.0.0.1 GATEWAYDEV=eth0
#todo: should we also add ETHER_SLEEP=$WAITTIME textmode=1 dns=$mnip ?
$args->{kernelparms} .= " $bootif IPADDR=$ip NETMASK=$netmask NETWORK=$network BROADCAST=$broadcast GATEWAY=$gateway HOSTNAME=$nodename DEVICE=$nic GATEWAYDEV=$nic";
}
else { # scripted install
#todo: the parameters for kickstart are likely different
$args->{kernelparms} .= " $bootif hostip=$ip netmask=$netmask gateway=$gateway dns=$mnip hostname=$nodename netdevice=$nic netwait=$WAITTIME textmode=1";
# print Dumper($args->{kernelparms})
else { # scripted install (kickstart or autoyast)
if ($args->{kernelparms} =~ m/autoyast=/) { # sles
# if site.managedaddressmode=static is set, it will put several of these kernel parms on there for us. Do not duplicate in that case.
if ($args->{kernelparms} !~ m/ hostip=/) { $args->{kernelparms} .= " hostip=$ip"; }
if ($args->{kernelparms} !~ m/ netmask=/) { $args->{kernelparms} .= " netmask=$netmask"; }
if ($args->{kernelparms} !~ m/ gateway=/) { $args->{kernelparms} .= " gateway=$gateway"; }
if ($args->{kernelparms} !~ m/ hostname=/) { $args->{kernelparms} .= " hostname=$nodename"; }
if ($args->{kernelparms} !~ m/ dns=/) { $args->{kernelparms} .= " dns=$mnip"; }
# If they set installnic=mac (recommended), the netdevice will already be set to the mac.
# If they explicitly set installnic=<nic>, then ksdevice will be set to that and we will not disturb it here.
# Otherwise add netdevice set to the nic we calculated it should be.
if ($args->{kernelparms} !~ m/ netdevice=/) { $args->{kernelparms} .= " netdevice=$nic"; }
$args->{kernelparms} .= " netwait=$WAITTIME textmode=1";
# print Dumper($args->{kernelparms})
}
elsif ($args->{kernelparms} =~ m/ks=/) { # rhel/centos
# See https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-startinginstall.html
# and http://fedoraproject.org/wiki/Anaconda/NetworkIssues for description of kickstart kernel parms
# if site.managedaddressmode=static is set, it will put several of these kernel parms on there for us. Do not duplicate in that case.
if ($args->{kernelparms} !~ m/ ip=/) { $args->{kernelparms} .= " ip=$ip"; }
if ($args->{kernelparms} !~ m/ netmask=/) { $args->{kernelparms} .= " netmask=$netmask"; }
if ($args->{kernelparms} !~ m/ gateway=/) { $args->{kernelparms} .= " gateway=$gateway"; }
if ($args->{kernelparms} !~ m/ hostname=/) { $args->{kernelparms} .= " hostname=$nodename"; }
if ($args->{kernelparms} !~ m/ dns=/) { $args->{kernelparms} .= " dns=$mnip"; }
# If they set installnic=mac (recommended), the ksdevice will already be set to the mac.
# If they explicitly set installnic=<nic>, then ksdevice will be set to that and we will not disturb it here.
# Otherwise ksdevice will be set to bootif, and we change it to the nic we calculated it should be.
if ($args->{kernelparms} =~ m/ ksdevice=bootif/) { $args->{kernelparms} =~ s/ ksdevice=bootif/ ksdevice=$nic/; }
elsif ($args->{kernelparms} !~ m/ ksdevice=/) { $args->{kernelparms} .= " ksdevice=$nic"; }
$args->{kernelparms} .= " nicdelay=$WAITTIME linksleep=$WAITTIME textmode=1";
# print Dumper($args->{kernelparms})
}
else { die "Error: for scripted installs, only support SLES or RHEL/CentOS as the target OS.\n"; }
}
}
@@ -134,8 +158,10 @@ sub getNodeIpInfo {
# so if we are on centos right now, we need to count down to determine the number that sles
# will give the nic that we have selected, because it is the sles naming that we care about,
# because that is the initrd that will be running in the scripted install case.
# For the sysclone case, genesis doxcat should be changed to use the mac to find the nic.
if (isRedhat()) {
# This works similarly (at least in some case) when rhel is the target OS.
# The preferred way is for the user to set installnic=mac, then we do not need to run this code.
# For the sysclone case, genesis doxcat uses the mac to find the nic.
if (isRedhat() && $args->{kernelparms} !~ m/ ksdevice=\S*:/ && $args->{kernelparms} !~ m/ netdevice=\S*:/) {
my @nics = grep(m/^\d+:\s+eth/, @output);
my $i = 0;
foreach my $line (@nics) {
@@ -143,8 +169,8 @@ sub getNodeIpInfo {
if (defined($nictmp) && $nictmp eq $realnic) { $realnic = "eth$i"; last; } # got ip, we are done
$i++;
}
print "Determined that SLES/RHEL will call the install NIC $realnic (it has mac $mac)\n";
}
print "Determined that SLES will call the install NIC $realnic (it has mac $mac)\n";
# finally, find the gateway
my $gateway;
+18 -9
View File
@@ -4,7 +4,7 @@
# even across vlans (w/o setting up pxe/dhcp broadcast relay). This assumes a working
# OS is on the node. This script is primarily meant to be used in the softlayer environment.
#todo: site attr for using static ip?
#todo: work with site.managedaddressmode=static for sles
use strict;
use Getopt::Long;
@@ -19,12 +19,12 @@ my $NOAUTOINST;
my $usage = sub {
my $exitcode = shift @_;
print "Usage: pushinitrd [-?|-h|--help] [-v|--verbose] [--dryrun] [-w <waittime>] <noderange>\n\n";
print "Usage: pushinitrd [-?|-h|--help] [-v|--verbose] [--dryrun] [-w <waittime>] [--noautoinst] <noderange>\n\n";
if (!$exitcode) {
print "Copy the initrd, kernel, params, and static IP info to nodes, so they can net install\n";
print "even across vlans (w/o setting up pxe/dhcp broadcast relay). This assumes a working\n";
print "OS is on the node, that you've run nodeset for these nodes, and that all of the nodes\n";
print "are using the same osimage.\n";
print "in this noderange are using the same osimage.\n";
}
exit $exitcode;
};
@@ -48,7 +48,7 @@ updateGrubOnNodes($noderange, \%bootparms);
if ($DRYRUN) { exit(0); }
if ($bootparms{osimageprovmethod} eq 'install' && !$NOAUTOINST) { modifyAutoinstFiles($noderange, \%bootparms); }
if ($bootparms{osimageprovmethod} eq 'install' && $bootparms{osimageosvers}=~ m/^sles/ && !$NOAUTOINST) { modifyAutoinstFiles($noderange, \%bootparms); }
if ($bootparms{osimageprovmethod} eq 'sysclone') { copySyscloneFiles(); }
@@ -77,11 +77,20 @@ sub getBootParms {
$bootparms{kcmdline} =~ s|/install/autoinst/\S+|/install/autoinst/<nodename>|;
# from the nodes provmethod, get the osimage provmethod, so we know the type of install
@output = runcmd("lsdef -t osimage $bootparms{provmethod} -ci provmethod");
chomp($output[0]);
if ($output[0] =~ m/^Could not find/) { die "Error: provmethod $bootparms{provmethod} is set for the node, but there is no osimage definition by that name."; }
my ($junk, $provmethod) = split(/=/, $output[0]);
$bootparms{osimageprovmethod} = $provmethod;
@output = runcmd("lsdef -t osimage $bootparms{provmethod} -ci provmethod,osvers");
foreach my $line (@output) {
chomp($line);
if ($line =~ m/^Could not find/) { die "Error: provmethod $bootparms{provmethod} is set for the node, but there is no osimage definition by that name."; }
if ($line =~ m/ provmethod=/) {
my ($junk, $provmethod) = split(/=/, $line);
$bootparms{osimageprovmethod} = $provmethod;
}
if ($line =~ m/ osvers=/) {
my ($junk, $osvers) = split(/=/, $line);
$bootparms{osimageosvers} = $osvers;
}
}
#print "provmethod=$bootparms{osimageprovmethod}, osvers=$bootparms{osimageosvers}\n"; exit;
# get the mgmt node cluster-facing ip addr
@output = runcmd('lsdef -t site -ci master');
+140
View File
@@ -0,0 +1,140 @@
#!/usr/bin/python
"""
Usage:
softlayer_storage.py --type=<type> [--hostname=<hostname> --username=<username> --password=<password> --mountpoint=<mountpoint> ] (mount | unmount)
softlayer_storage.py --type=<type> [options] (mount | unmount)
Options:
-h --help Show help screen
--version Show version
--type=<type> Type of File Storage to mount ( consistent | nas )
--hostname=<hostname> SoftLayer Storage hostname
--username=<username> SoftLayer Storage LUN username
--password=<password> SoftLayer Storage LUN password
--mountpoint=<mountpoint> The mountpoint to use [default: /mnt/nas]
Description:
For consistent performance file storate, make sure the host accessing the
file storage has been authorized through the SoftLayer portal.
"""
import os
import sys
import docopt
path = os.path.dirname(os.path.realpath(__file__))
path = os.path.realpath(os.path.join(path, '..', 'lib', 'python'))
if path.startswith('/opt'):
# if installed into system path, do not muck with things
sys.path.append(path)
from xcat import xcatutils
def mount_nas_storage(hostname, user, passwd, mountPoint):
print "Attempting to mount the NAS File Storage at %s" %(mountPoint)
if xcatutils.isMounted(mountPoint):
raise xcatutils.xCatError("The mount point %s is already in use." %(mountPoint))
cmd = "mount -t cifs //%s/%s -o username=%s,password=%s,rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755 %s" %(hostname, user, user, passwd, mountPoint)
out,err = xcatutils.run_command(cmd)
if err:
raise xcatutils.xCatError("Error when mounting. (%s)" %(err))
else:
print "Success\n"
# To help out with automount, print this msg
print "\nNote: To configure automount on reboot, add the following into /etc/fstab:"
cmd = "//%s/%s %s cifs defaults,username=%s,password=%s 0 0" %(hostname,user,mountPoint,user,passwd)
print "%s\n" %(cmd)
def mount_consistent_storage(hostname, user, mountPoint):
# TODO: would be good to be able to specify the nfs version as a argument
print "Attempting to mount the Consistent Performance File Storage at %s" %(mountPoint)
if xcatutils.isMounted(mountPoint):
raise xcatutils.xCatError("The mount point %s is already in use." %(mountPoint))
cmd = "mount -t nfs4 %s:/%s %s" %(hostname, user, mountPoint)
out,err = xcatutils.run_command(cmd)
if err:
raise xcatutils.xCatError("Error when mounting. (%s)" %(err))
else:
print "Success\n"
# To help out with automount, print this msg
print "\nNote: To configure automount on reboot, add the following into /etc/fstab:"
cmd = "%s:/%s %s nfs4 defaults,hard,intr 0 0" %(hostname,user,mountPoint)
print "%s\n" %(cmd)
def unmount_storage(mountPoint):
print "Attempting to unmount the NAS at %s..." %(mountPoint)
if not xcatutils.isMounted(mountPoint):
raise xcatutils.xCatError("The mount point %s is NOT mounted." %(mountPoint))
else:
cmd = "umount %s" %(mountPoint)
out,err = xcatutils.run_command(cmd)
if err:
print "Encountered error while unmounting..."
print err
def setup_softlayer_storage():
#
# set code defaults to consistent file storage options
#
requirePassword=False
preReqPackages = ['nfs-utils','nfs-utils-lib']
#
# if NAS is selected as the type, override the code defaults
#
if 'nas' in arguments['--type']:
requirePassword=True
preReqPackages = ['cifs-utils']
#
# verify information before starting
#
if arguments['--hostname'] is None:
arguments['--hostname'] = xcatutils.getUserInput("Enter the SoftLayer storage hostname")
if arguments['--username'] is None:
arguments['--username'] = xcatutils.getUserInput("Enter the SoftLayer storage username")
if arguments['--password'] is None and requirePassword:
arguments['--password'] = xcatutils.getUserInput("Enter the SoftLayer storage password")
#
# install prereqs
#
print "Checking for installed packages: %s" %(preReqPackages)
xcatutils.installPackages(preReqPackages)
#
# mount the file storage
#
if 'nas' in arguments['--type']:
mount_nas_storage(arguments['--hostname'],arguments['--username'],arguments['--password'],arguments['--mountpoint'])
elif 'consistent' in arguments['--type']:
mount_consistent_storage(arguments['--hostname'],arguments['--username'],arguments['--mountpoint'])
if __name__ == '__main__':
try:
arguments = (docopt.docopt(__doc__, version="1.0"))
if not arguments['--type'] in ('nas', 'consistent'):
raise xcatutils.xCatError("The type=%s is not a supported file system type." %(arguments['--type']))
if arguments['unmount']:
unmount_storage(arguments['--mountpoint'])
else:
setup_softlayer_storage()
except docopt.DocoptExit as e:
print e
except xcatutils.xCatError as e:
print "xCatError: %s" %(e)
@@ -0,0 +1,85 @@
import sys
import os
import platform
class xCatError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def isMounted(mountPoint):
if os.path.ismount(mountPoint):
return True
else:
return False
def run_command(cmd):
"""
Function: run_command
Arguments: cmd - string to be run as a command
Description: runs the command then returns out and err
"""
import subprocess
p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
(out,err) = p.communicate()
return (out,err)
def isRhel():
myDistro = platform.linux_distribution()
if "Red Hat Enterprise Linux Server" or "CentOS" in myDistro:
return True
else:
return False
def isSles():
myDistro = platform.linux_distribution()
if "SUSE Linux Enterprise Server" in myDistro:
return True
else:
return False
def isUbuntu():
myDistro = platform.linux_distribution()
if "Ubuntu" in myDistro:
return True
else:
return False
def getUserInput(question):
response = raw_input("%s: " %(question))
return response
def filterInstalledPackages(pkglist=[]):
fulllist = ""
if isRhel():
# using YUM
import yum
yb = yum.YumBase()
for x in pkglist:
if not yb.rpmdb.searchNevra(name='%s' %(x)):
fulllist += "%s " %(x)
return fulllist
def installPackages(pkglist=[]):
fulllist = filterInstalledPackages(pkglist)
if isRhel():
if fulllist.strip() != "":
cmd = "yum -y install %s" %(fulllist)
out,err = xcatutils.run_command(cmd)
elif isSles():
print "Using zyppr..."
elif isUbuntu():
print "Using apt-get..."
else:
print "Error!"
-248
View File
@@ -1,248 +0,0 @@
#!/usr/bin/perl
# xCAT postscript for configuring bonding of nics.
# Usage: configbond bond1 eth1 [eth3]
#
# Note: this postscript currently has some assumptions that are specific to the softlayer environment.
# We only use this to configure bond1, because bond0 gets configured by the node provisioning process.
# (altho this script would work for bond0)
use strict;
# Check number of args
my $nargs = $#ARGV + 1;
if (scalar(@ARGV) < 2 || scalar(@ARGV) > 3) {
system("logger -t xcat -p local4.err 'Usage: configbond <bond> <dev0> [<dev1>]'");
exit 1;
}
my $bond = shift(@ARGV);
my $nic = $ARGV[0];
my @devs;
foreach my $a (@ARGV) { push(@devs,split('@',$a)); } # support the new syntax in the xcat configbond postscript
my $nicips = $ENV{NICIPS};
my $nicnetworks = $ENV{NICNETWORKS};
my $net_cnt = $ENV{NETWORKS_LINES};
#todo: change this script so they dont need to specify nicnetworks
if (!$nicips || !$nicnetworks) { system("logger -t xcat -p local4.err 'configbond: must specify attributes nicips and nicnetworks in the xcat db for this node.'"); exit 1; }
#todo: these are specific to softlayer. They should be another attribute or argument
my $bondingopts = 'mode=4 miimon=100 downdelay=0 updelay=0 lacp_rate=fast xmit_hash_policy=1';
my $netmask ='';
my $ipaddr = '';
my $nic_num = '';
my $subnet = '';
my $nic_net = '';
my $net_name = '';
my @nic_nets = (); # array of networks for this nic
my @nic_ips =(); # array of ipaddresses for this nic
my @networks = (); # array of all networks from networks table.
# { network_name, subnet, netmask }
system("logger -t xcat -p local4.err 'configbond: Master: $bond'");
system("logger -t xcat -p local4.err 'configbond: Slaves: @devs'");
#system("logger -t xcat -p local4.err 'configbond: NIC: $nic'");
system("logger -t xcat -p local4.err 'configbond: NICNETWORKS: $nicnetworks'");
system("logger -t xcat -p local4.err 'configbond: NICIPS: $nicips'");
# Update modprobe
my $file = "/etc/modprobe.d/$bond.conf";
if (!open(FILE, ">$file")) { system("logger -t xcat -p local4.err 'configbond: cannot open $file.'"); exit 1; }
print FILE "alias $bond bonding\n";
# the bonding options are put in the ifcfg file instead
#print FILE "options $bond mode=balance-rr miimon=100\n";
close FILE;
# create array of network info. Needed in case where there are
# more than one ip address per nic and shouldn't be many networks.
my $net_info;
my $cnt = 1;
while ( $cnt <= $net_cnt ) {
$net_info = $ENV{"NETWORKS_LINE$cnt"};
$net_info =~ /^netname=([^\|]*)\|\|/;
$net_name = $1;
$net_info =~ /net=([^\|]*)\|\|/;
$subnet = $1;
$net_info =~ /mask=([^\|]*)\|\|/;
$netmask = $1;
push @{ $networks[$cnt-1] }, ($net_name, $subnet, $netmask);
$cnt +=1;
}
# get network or networks for this nic from NICNETWORKS:
# eth0:1_0_0_0-255_255_0_0|network2,eth1:1_1_0_0
# create array of networks for this nic
foreach my $nic_networks (split(/,/,$nicnetworks)) {
my @net = ();
if ( $nic_networks =~ /!/ ) {
@net = split(/!/,$nic_networks);
} else {
@net = split(/:/,$nic_networks);
}
if ($net[0] eq $nic) {
@nic_nets = split(/\|/,$net[1]);
last;
}
}
# get all nic ipaddress from $nicips: i.e. eth0:1.0.0.1|2.0.0.1,eth1:1.1.1.1
# Then get all ips for this specific nic, i.e. eth0.
foreach my $ips (split(/,/,$nicips)) {
my @ip = ();
if ( $ips =~ /!/ ) {
@ip = split(/!/,$ips);
} else {
@ip = split(/:/,$ips);
}
if ($ip[0] eq $nic ) {
@nic_ips = split(/\|/,$ip[1]);
}
}
my $i;
for ($i=0; $i < (scalar @nic_ips) ; $i++ ) {
# Time to create the interfaces.
# loop through the nic networks, find the matching networks to get the
# subnet and netmask and then create the appropriate ifcfg file for linux
my $specific_nic = $nic;
if ($i > 0) {
$specific_nic = $nic . ":" . ($i);
}
#todo: support case in which nicnetworks is not specified, find the correct network by calculation
$cnt = 0;
$subnet = "";
$netmask = "";
$net_name = "";
while ( $cnt < $net_cnt ) {
if ( $networks[$cnt][0] eq $nic_nets[$i] ) {
$subnet = $networks[$cnt][1];
$netmask = $networks[$cnt][2];
$cnt = $net_cnt; # found match - get out.
}
else {
$cnt++;
}
}
# check that there is a subnet and netmask set
if ( !(length($subnet) > 0) || !(length($netmask) > 0) ) {
system("logger -t xcat -p local4.err 'configbond: network subnet or netmask not set.'");
exit 1;
}
system("logger -t xcat -p local4.err 'configbond: network subnet and netmask: $subnet, $netmask'");
system("logger -t xcat -p local4.err 'configbond: $specific_nic, $nic_ips[$i]'");
# Write the master info to the ifcfg file
if (-d "/etc/sysconfig/network-scripts") {
# rhel/centos/fedora
my $dir = "/etc/sysconfig/network-scripts";
if (!open(FILE, ">$dir/ifcfg-$bond")) { system("logger -t xcat -p local4.err 'configbond: cannot open $dir/ifcfg-$bond.'"); exit 1; }
print FILE "DEVICE=$bond\n";
print FILE "BOOTPROTO=none\n";
print FILE "IPADDR=$nic_ips[$i]\n";
print FILE "NETMASK=$netmask\n";
print FILE "ONBOOT=yes\n";
print FILE "USERCTL=no\n";
print FILE qq(BONDING_OPTS="$bondingopts"\n);
close FILE;
# Configure slaves
my @output = `ip addr show 2>&1`; # to check for existance of the device later
foreach my $dev (@devs) {
# as a convenience, make sure the device exists before adding it to the bond
if (!grep(m/^\d+:\s+$dev:/, @output)) {
system("logger -t xcat -p local4.err 'configbond: not configuring $dev because it does not exist.'");
unlink("$dir/ifcfg-$dev"); # in case it was left over in the image we are cloning
next;
}
system("logger -t xcat -p local4.err 'configbond: slave dev: $dev'");
if (!open(FILE, ">$dir/ifcfg-$dev")) { system("logger -t xcat -p local4.err 'configbond: cannot open $dir/ifcfg-$dev'"); exit 1; }
print FILE "DEVICE=$dev\n";
print FILE "BOOTPROTO=none\n";
print FILE "MASTER=$bond\n";
print FILE "ONBOOT=yes\n";
print FILE "SLAVE=yes\n";
print FILE "USERCTL=no\n";
close FILE;
}
}
elsif (-d "/etc/sysconfig/network") {
# sles
my $dir = "/etc/sysconfig/network";
if (!open(FILE, ">$dir/ifcfg-$bond")) { system("logger -t xcat -p local4.err 'configbond: cannot open $dir/ifcfg-$bond.'"); exit 1; }
print FILE "BOOTPROTO=static\n";
print FILE "BONDING_MASTER=yes\n";
print FILE "BONDING_MODULE_OPTS='$bondingopts'\n";
print FILE "NAME='Bonded Interface'\n";
print FILE "IPADDR=$nic_ips[$i]\n";
print FILE "NETMASK=$netmask\n";
print FILE "STARTMODE=onboot\n";
print FILE "USERCONTROL=no\n";
my $devnum = 0;
my @output = `ip addr show 2>&1`; # to check for existance of the device later
foreach my $dev (@devs) {
if (!grep(m/^\d+:\s+$dev:/, @output)) { next; }
print FILE "BONDING_SLAVE_$devnum=$dev\n";
$devnum++;
}
close FILE;
# Configure slaves
foreach my $dev (@devs) {
# as a convenience, make sure the device exists before adding it to the bond
if (!grep(m/^\d+:\s+$dev:/, @output)) {
system("logger -t xcat -p local4.err 'configbond: not configuring $dev because it does not exist.'");
unlink("$dir/ifcfg-$dev"); # in case it was left over in the image we are cloning
next;
}
system("logger -t xcat -p local4.err 'configbond: slave dev: $dev'");
if (!open(FILE, ">$dir/ifcfg-$dev")) { system("logger -t xcat -p local4.err 'configbond: cannot open $dir/ifcfg-$dev'"); exit 1; }
print FILE "BOOTPROTO=none\n";
print FILE "STARTMODE=hotplug\n";
close FILE;
}
}
else {
# do not recognize this distro
system("logger -t xcat -p local4.err 'configbond: network directory is not either the Red Hat or SuSE format.'");
exit 1;
}
# Apply the changes. Since we are only doing bond1 right now, lets not restart the whole network
# so we dont disrupt the installnic connection. Instead we just need to bring down the slave nics,
# and then bring up the bond nic.
#runcmd("service network restart");
foreach my $dev (@devs) {
runcmd("ifdown $dev");
}
runcmd("ifdown $bond"); # in case it was already up
runcmd("ifup $bond"); # note: this wont reload the bonding kernel module, so we are depending on the provisioning process to already have set the correct bonding options
system("logger -t xcat -p local4.info 'configbond: successfully configured $specific_nic.'");
}
exit 0;
sub runcmd {
my $cmd = shift @_;
$cmd .= ' 2>&1';
my @output = `$cmd`;
my $rc = $? >> 8;
if ($rc) {
system("logger -t xcat -p local4.err 'configeth: command $cmd failed with rc $rc: " . join('',@output) . "'");
my $errout= "configeth: command $cmd failed with rc $rc.";
`echo $errout`;
exit $rc;
}
}
@@ -1,28 +0,0 @@
#!/bin/bash
# set the default route of the node to the ip address and nic passed in
# this should be added to the postbootscripts, NOT postscripts
gateway="$1"
nic="$2"
# set it temporarily
echo "ip route replace to default via $gateway dev $nic"
ip route replace to default via $gateway dev $nic
# set it permanently
#todo: this is only for sles right now
file=/etc/sysconfig/network/routes
if grep -q -E '^default ' $file; then
# replace the default route that is already in there
sed -i 's/^default .*$/default '$gateway' - -/' $file
else
# no default route yet, append to file
echo "default $gateway - -" >>$file
fi
# While we are here, clean up the network wait hack, if it is still there.
# (It was added during scripted install, because autoyast will not use the bond
# configuration for 1 part of the process.) Do not know a better place to clean
# this up.
sed -i '/Waiting to reach xCAT mgmt node/d' /etc/init.d/network
+8 -9
View File
@@ -47,8 +47,11 @@ xCAT-SoftLayer provides Utilities to make xCAT work in a SoftLayer environment.
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/python
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/python/xcat
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts
#mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-SoftLayer
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man1
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
@@ -59,8 +62,10 @@ cp -p -R share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/
cp -d bin/* $RPM_BUILD_ROOT/%{prefix}/bin
chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
cp -d postscripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts/*
cp -d lib/python/xcat/* $RPM_BUILD_ROOT/%{prefix}/lib/python/xcat/
#cp -d postscripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts
#chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/postscripts/*
cp -d si-post-install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/post-install
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/sysclone/post-install/*
@@ -84,9 +89,3 @@ rm -rf $RPM_BUILD_ROOT
%post
# We are shipping the postscripts in a sysclone dir and then copying them to /install/postscripts here,
# because we want to allow base xcat to eventually ship them and not conflict on the file name/path
# But base xcat now has a newer/better configbond written in bash, so if that is there do not overwrite it.
head /install/postscripts/configbond | grep -q -E '^#! */bin/bash'
if [[ $? != 0 ]]; then
# the new configbond from xcat 2.8.5 is not there, so copy ours
cp -f /%{prefix}/share/xcat/sysclone/postscripts/* /install/postscripts
fi
+2 -4
View File
@@ -101,15 +101,13 @@ ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/webportal
# Inspect whether PHP related RPM packages are installed
%ifos linux
if [ -e "/etc/redhat-release" ]; then
rpm -q php >/dev/null
if [ $? != 0 ]; then
if [ ! -e "/etc/httpd/conf.d/php.conf" ]; then
echo ""
echo "Error! php has not been installed. Please run 'yum install php' before installing xCAT-UI.";
exit -1;
fi
else # SUSE
rpm -q apache2-mod_php5 php5 >/dev/null
if [ $? != 0 ]; then
if [ ! -e "/etc/apache2/conf.d/php5.conf" ]; then
echo ""
echo "Error! apache2-mod_php5 and php5 have not been installed. Please run 'zypper install apache2-mod_php5 php5' before installing xCAT-UI."
exit -1;
+265 -41
View File
@@ -322,6 +322,7 @@ if (
'k|kitversion=s' => \$::KITVERSION,
'r|kitrelease=s' => \$::KITRELEASE,
'l|kitloc=s' => \$::KITLOC,
'for=s' => \$::FOROSVERSARCH,
)
)
{
@@ -337,18 +338,34 @@ if ($::HELP)
}
my $debianflag = 0;
my $dpkg_flag = '-uc -us';
my $tempstring = xCAT::BuildKitUtils->osver();
if ( $tempstring =~ /debian/ || $tempstring =~ /ubuntu/ ){
$debianflag = 1;
}
# This is an undocumented flag to support our local build team
# to allow building Ubuntu kits on our RH build machines.
# It requires RH rpms such as dep, fakeroot, perl-File-DesktopEntry,
# perl-File-BaseDir, and html2text to be installed on the build server
# for this to work. To use this flag:
# buildkit --for ubuntu buildrepo <reponame>
# buildkit --for ubuntu buildtar
if ($::FOROSVERSARCH) {
if ( $::FOROSVERSARCH =~ /debian/ || $::FOROSVERSARCH =~ /ubuntu/ ) {
$debianflag=1;
$dpkg_flag .= ' -A -d';
}
}
# display the version statement if -v or --version is specified
if ($::VERSION)
{
my $versioncmd = "rpm -q --qf \"%{NAME}: %{VERSION}-%{RELEASE} \n\" xCAT-buildkit";
my $message = "Error quering xCAT-buildkit rpm. Version info is not available. \n";
if ( $debianflag ){
$versioncmd = "dpkg-query --show -f='\${PackageSpec}: \${Version}\n' xcat-buildkit";
$versioncmd = "dpkg-query --show -f='\${binary:Package}: \${Version}\n' xcat-buildkit";
$message = "Error quering xcat-buildkit package. Version info is not available. \n";
}
if ( system($versioncmd) ) {
@@ -764,20 +781,21 @@ sub kit_buildrepo1
}
}
# Build kitcomponent metapackages
# Build kitcomponent preppackages and metapackages
if ( $debianflag ){
foreach my $kc (@{$::bldkit_config->{kitcomponent}{entries}}) {
if ($repoid ne $kc->{kitrepoid}) { next; }
my $debname = "$repodir/".&comppkgname($kc);
if (-r $debname) { next; }
if ($::VERBOSE) { print "building kitcomponent metapackage for $kc->{basename} \n";}
if ($::VERBOSE) { print "building kitcomponent package for $kc->{basename} \n";}
if (&build_kitcomp_debian($kc)) {
print "Error building kitcomponent metapackage for $kc->{basename} \n";
return 1;
}
}
if ( system("dpkg-scanpackages $repodir > $repodir/Packages") ) {
print "Error building the repository meta-data with the dpkg-scanpackages command \n";
if ( system("cd $repodir;dpkg-scanpackages . > Packages") ) {
print "Error building the repository meta-data with the dpkg-scanpackages command \n";
return 1;
}
}
@@ -1005,7 +1023,7 @@ sub kit_buildtar
}
}
print "Creating tar file $tarfile.\n";
print "Creating tar file $::current_dir/$kitfilename.\n";
if ( system("cd $::deploy_dir; cd ..; tar -cjhf $tarfile $kitname/*") ) {
print "Error building tarfile $tarfile \n";
@@ -1145,8 +1163,16 @@ sub edit_bldkitconf
my ($osbasename,$osmore) = split(/\,/, $osinfo);
my ($osmajorversion,$osminorversion) = split(/\./, $osmore);
my $osarch=`uname -p`;
chomp($osarch);
my $kitcomponent_basename = $kitname."_compute";
if ($debianflag==1) {
if($osarch eq "ppc64le"){
$osarch="ppc64el";
}
$kitcomponent_basename = $kitname."-compute";
}
for (@lines) {
s/<<<INSERT_kitbasename_HERE>>>/$kitname/;
s/<<<INSERT_kitrepoid_HERE>>>/$kitrepoid/;
@@ -1865,6 +1891,12 @@ sub validate_os
my ($osmajorversion,$osminorversion) = split(/\./, $osmore);
my $osarch=`uname -p`;
chomp($osarch);
if ($debianflag==1) {
if($osarch eq "ppc64le"){
$osarch="ppc64el";
}
}
$osinfo =~ s/\,//;
my $repo_osinfo = "$repo->{osbasename}$repo->{osmajorversion}";
if (defined($repo->{osminorversion})){
@@ -1969,7 +2001,7 @@ sub build_kitcomp
$::VALID_PRER_COMPONENT = 0;
if ( !$::PREREQUISITE ) {
if ( $comp->{ospkgdeps} || $comp->{preinstall} || $comp->{preupgrade} || $comp->{preuninstall} ) {
if ( $comp->{ospkgdeps} || $comp->{preinstall} || $comp->{preupgrade} ) {
if ( &gen_kitcomp_spec($comp,\%repo, 'PREREQUISITE') ) { return 1; }
# run the rpmbuild command
@@ -2344,7 +2376,7 @@ sub gen_kitcomp_spec
s/<<<INSERT_kitcomponent_postinstall_script_HERE>>>/$postscript/;
s/<<<INSERT_kitcomponent_preupgrade_script_HERE>>>//;
s/<<<INSERT_kitcomponent_postupgrade_script_HERE>>>/$postupscript/;
s/<<<INSERT_kitcomponent_preuninstall_script_HERE>>>//;
s/<<<INSERT_kitcomponent_preuninstall_script_HERE>>>/$preunscript/;
s/<<<INSERT_kitcomponent_postuninstall_script_HERE>>>/$postunscript/;
}
}
@@ -2407,14 +2439,45 @@ sub build_kitcomp_debian{
}
}
#run the dpkg-buildpackage command
my $curdir = $::workdir;
my $cmd = "rm -Rf $debbuilddir";
system($cmd);
mkpath($debbuilddir);
#Create debian directory for this kit component
if ( &gen_kitcomp_debdir($comp,\%repo) ) { return 1; }
$::VALID_PREP_COMPONENT = 0;
if ( !$::PREREQUISITE ) {
if ( $comp->{ospkgdeps} || $comp->{preinstall} || $comp->{preupgrade} || $comp->{preuninstall} ) {
#Create debian directory for this kit component preppackage
if ( &gen_kitcomp_debdir_prep($comp,\%repo) ) { return 1; }
$::VALID_PREP_COMPONENT = 1;
# build prep deb
my $prep_compversion = $comp->{version} . "-" . $comp->{release};
my $prep_buildstring = "Prep Kit component build package.";
my $prep_debbuilddir = $::workdir."/debbuild/"."prep-".$comp->{kitcompname};
my $prep_debianbuildcmd = "cd $prep_debbuilddir;debchange -v $prep_compversion -b -c debian/changelog $prep_buildstring;dpkg-buildpackage $dpkg_flag";
if ( system($prep_debianbuildcmd) ) {
print "Error running \"dpkg-buildpackage $dpkg_flag\" command for kit component prep-$comp->{kitcompname} meta package\n";
return 1;
}
}
#Create debian directory for this kit component metapackage
if ( &gen_kitcomp_debdir($comp,\%repo,'METADEB') ) { return 1; }
} else {
#Create debian directory for this kit component
if ( &gen_kitcomp_debdir($comp,\%repo,'ALL') ) { return 1; }
}
if (defined($comp->{non_native_pkgs}) ) {
my $sourcedir = $::workdir."/source_packages";
@@ -2436,11 +2499,11 @@ sub build_kitcomp_debian{
}
}
my $compversion = $comp->{version} . "-" . $comp->{release};
my $buildstring = "Kit component build package.";
my $debianbuildcmd = "cd $debbuilddir;dch -v $compversion -b -c debian/changelog $buildstring;dpkg-buildpackage -uc -us";
my $buildstring = "\'Kit component build package.\'";
my $debianbuildcmd = "cd $debbuilddir;debchange -v $compversion -b -c debian/changelog $buildstring;dpkg-buildpackage $dpkg_flag";
if ( !$::NON_NATIVE_PKGS->{$comp->{kitcompname}} ) {
if ( system($debianbuildcmd) ) {
print "Error running \"dpkg-buildpackage -uc -us\" command for kit component $comp->{kitcompname} meta package\n";
print "Error running \"dpkg-buildpackage $dpkg_flag\" command for kit component $comp->{kitcompname} meta package\n";
return 1;
}
my $repodir = $::base_repodir."/".$repo{kitreponame};
@@ -2456,6 +2519,99 @@ sub build_kitcomp_debian{
return 0;
}
#-----------------------------------------------------------------------------
=head3 gen_kitcomp_debdir_prep
=cut
#-----------------------------------------------------------------------------
sub gen_kitcomp_debdir_prep{
my $comp = shift;
my $repo = shift;
my $scriptdir = $::workdir."/scripts/";
my $combuilddir = $::workdir."/debbuild/"."prep-".$comp->{kitcompname};
#copy the debian dir template to the build path
mkpath("$combuilddir/debian");
my $cmd = "cp -Rf " . $::XCATSHARE . "/kits/debian_template/* $combuilddir/debian/";
system($cmd);
my $kitname = $::bldkit_config->{kit}{entries}[0]->{basename};
my $kitcompname = "prep-".$comp->{kitcompname};
my $upgradeflag = "pre-".$comp->{basename} . ".tmp";
my ($prescript,$postscript,$preupscript,$postupscript,$preunscript,$postunscript,$nonnativepkgs) = '';
if (defined($comp->{preinstall})) {
$prescript = &load_script("$scriptdir$comp->{preinstall}");
}
if (defined($comp->{preupgrade})) {
$preupscript = &load_script("$scriptdir$comp->{preupgrade}");
}
if (defined($comp->{preuninstall})) {
$preunscript = &load_script("$scriptdir$comp->{preuninstall}");
}
#replace all special sub string in all files under debian
unless (opendir(DH, "${combuilddir}/debian/")){
print "Can not open the xCAT Kit Component debian dir: ${combuilddir}/debian/";
return 1;
}
foreach (readdir(DH)){
my $file = "${combuilddir}/debian/$_";
if ( -d $file){
next;
}
unless ( open ( FH, "<", $file )){
print "Error attempting to open the xCAT Kit Component ${kitcompname}'s debian template file $file.\n";
close(DH);
return 1;
}
if ($::VERBOSE){
print "Reading the xCAT Kit Component ${kitcompname}'s debian template file $file. \n";
}
my @lines = <FH>;
close(FH);
my $prep_comp_name="prep-".$comp->{basename};
for(@lines) {
chomp;
s/<<<INSERT_kitcomponent_basename_HERE>>>/$prep_comp_name/;
s/<<<INSERT_kitcomponent_ospkgdeps_HERE>>>/$comp->{ospkgdeps}/;
s/<<<INSERT_kitcomponent_kitpkgdeps_HERE>>>//;
s/<<<INSERT_kitcomponent_kitcompdeps_HERE>>>//;
s/<<<INSERT_kitcomponent_desc_HERE>>>/$comp->{description}/;
s/<<<INSERT_kitcomponent_upgrade_flag_HERE>>>/$upgradeflag/;
s/<<<INSERT_kitcomponent_preinstall_script_HERE>>>/$prescript/;
s/<<<INSERT_kitcomponent_postinstall_script_HERE>>>//;
s/<<<INSERT_kitcomponent_preupgrade_script_HERE>>>/$preupscript/;
s/<<<INSERT_kitcomponent_postupgrade_script_HERE>>>//;
s/<<<INSERT_kitcomponent_preuninstall_script_HERE>>>/$preunscript/;
s/<<<INSERT_kitcomponent_postuninstall_script_HERE>>>//;
}
my $joined_lines = join("\n", @lines);
@lines = split(/\\n/,$joined_lines);
open (FH, ">", $file);
if ($::VERBOSE){
print "Created kitcomponent ${kitcompname}'s build file under debian dir $file";
}
print FH @lines;
close(FH);
}
closedir(DH);
return 0;
}
#-----------------------------------------------------------------------------
=head3 gen_kitcomp_debdir
@@ -2468,6 +2624,7 @@ sub build_kitcomp_debian{
sub gen_kitcomp_debdir{
my $comp = shift;
my $repo = shift;
my $level = shift;
my $scriptdir = $::workdir."/scripts/";
my $combuilddir = $::workdir."/debbuild/".$comp->{kitcompname};
@@ -2481,29 +2638,38 @@ sub gen_kitcomp_debdir{
my $upgradeflag = $comp->{basename} . ".tmp";
my ($prescript,$postscript,$preupscript,$postupscript,$preunscript,$postunscript,$nonnativepkgs) = '';
if (defined($comp->{preinstall})) {
$prescript = &load_script("$scriptdir$comp->{preinstall}");
}
if (defined($comp->{postinstall})) {
$postscript = &load_script("$scriptdir$comp->{postinstall}");
}
if (defined($comp->{preupgrade})) {
$preupscript = &load_script("$scriptdir$comp->{preupgrade}");
}
if (defined($comp->{postupgrade})) {
$postupscript = &load_script("$scriptdir$comp->{postupgrade}");
}
if (defined($comp->{preuninstall})) {
$preunscript = &load_script("$scriptdir$comp->{preuninstall}");
}
if (defined($comp->{postuninstall})) {
$postunscript = &load_script("$scriptdir$comp->{postuninstall}");
}
if (defined($comp->{non_native_pkgs})) {
$nonnativepkgs = "\n";
$nonnativepkgs .= "mkdir -p \$RPM_BUILD_ROOT/opt/xcat/kits/$kitname/$kitcompname \n";
$nonnativepkgs .= "cp -a * \$RPM_BUILD_ROOT/opt/xcat/kits/$kitname/$kitcompname \n";
if ($level eq 'METADEB' || $level eq 'ALL')
{
if (defined($comp->{postinstall})) {
$postscript = &load_script("$scriptdir$comp->{postinstall}");
}
if (defined($comp->{postupgrade})) {
$postupscript = &load_script("$scriptdir$comp->{postupgrade}");
}
if (defined($comp->{postuninstall})) {
$postunscript = &load_script("$scriptdir$comp->{postuninstall}");
}
if (defined($comp->{non_native_pkgs})) {
$nonnativepkgs = "\n";
$nonnativepkgs .= "mkdir -p \$RPM_BUILD_ROOT/opt/xcat/kits/$kitname/$kitcompname \n";
$nonnativepkgs .= "cp -a * \$RPM_BUILD_ROOT/opt/xcat/kits/$kitname/$kitcompname \n";
}
}
if ($level eq 'ALL')
{
if (defined($comp->{preinstall})) {
$prescript = &load_script("$scriptdir$comp->{preinstall}");
}
if (defined($comp->{preupgrade})) {
$preupscript = &load_script("$scriptdir$comp->{preupgrade}");
}
if (defined($comp->{preuninstall})) {
$preunscript = &load_script("$scriptdir$comp->{preuninstall}");
}
}
#replace all special sub string in all files under debian
unless (opendir(DH, "${combuilddir}/debian/")){
@@ -2528,12 +2694,20 @@ sub gen_kitcomp_debdir{
}
my @lines = <FH>;
close(FH);
my $prepcomp="prep-".$comp->{basename};
for(@lines) {
chomp;
s/<<<INSERT_kitcomponent_basename_HERE>>>/$comp->{basename}/;
s/<<<INSERT_kitcomponent_ospkgdeps_HERE>>>/$comp->{ospkgdeps}/;
s/<<<INSERT_kitcomponent_kitpkgdeps_HERE>>>/$comp->{kitpkgdeps}/;
s/<<<INSERT_kitcomponent_kitcompdeps_HERE>>>/$comp->{kitcompdeps}/;
if ( $::VALID_PREP_COMPONENT ) {
s/<<<INSERT_kitcomponent_kitcompdeps_HERE>>>/$comp->{kitcompdeps},$prepcomp/;
}
else
{
s/<<<INSERT_kitcomponent_kitcompdeps_HERE>>>/$comp->{kitcompdeps}/;
}
s/<<<INSERT_kitcomponent_desc_HERE>>>/$comp->{description}/;
s/<<<INSERT_kitcomponent_upgrade_flag_HERE>>>/$upgradeflag/;
s/<<<INSERT_kitcomponent_preinstall_script_HERE>>>/$prescript/;
@@ -2682,8 +2856,13 @@ sub create_kitconf
$::kit_config->{$s}{entries}[$li]->{kitreponame} =
$se->{kitreponame};
if ( !$::PREREQUISITE and ($se->{ospkgdeps} || $se->{preinstall} || $se->{preupgrade} || $se->{preuninstall}) ) {
$::kit_config->{$s}{entries}[$li]->{prerequisite} =
if ( $debianflag ){
$::kit_config->{$s}{entries}[$li]->{prerequisite} =
"prep-" . $se->{basename};
}else{
$::kit_config->{$s}{entries}[$li]->{prerequisite} =
"prep_" . $se->{basename};
}
}
}
$li++;
@@ -3401,7 +3580,7 @@ sub kit_addpkgs
#for debian/ubuntu
my $repodir = $tmpdir . "/repos/".$non_native_kitreponame;
if ( $debianflag ){
my $debbuildcmd = "cd $source_dir;dpkg-buildpackage -uc -us";
my $debbuildcmd = "cd $source_dir;dpkg-buildpackage $dpkg_flag";
if ( system($debbuildcmd) ){
print "error running debian build cmd for kit component $non_native_basename meta package.\n";
return 1;
@@ -3587,9 +3766,13 @@ sub NEW_kit_addpkgs
if ($kp->{isexternalpkg} eq 'yes') {
my $ext_filename = $kp->{filename};
my $ext_reponames = $kp->{kitreponame};
my $files = xCAT::BuildKitUtils->find_latest_pkg(\@pkgdirlist, $ext_filename);
my $files;
if($debianflag){
$files = xCAT::BuildKitUtils->find_latest_pkg_deb(\@pkgdirlist, $ext_filename);
}
else {
$files = xCAT::BuildKitUtils->find_latest_pkg(\@pkgdirlist, $ext_filename);
}
if (!defined($files) ) {
print "Error: The product package file $ext_filename was not found in the package directory(s) @pkgdirlist.\n";
# Cleanup
@@ -3709,6 +3892,47 @@ sub NEW_kit_addpkgs
}
}
#When using -k -r, there are useless repodir
#delete useless repo dir
my $kitrepodirby=$::base_repodir;
my $cmdby = "/bin/ls $kitrepodirby 2>/dev/null";
my $outputby = `$cmdby`;
my @allrepolist = split(/\n/, $outputby);
my @dellist;
foreach my $reponame (@allrepolist)
{
my $match=0;
foreach my $kr (@{$::bldkit_config->{kitrepo}{entries}})
{
my $repodirname = "$kr->{kitreponame}";
if ( ${repodirname} eq ${reponame} )
{
${match}++;
}
}
if ( ${match} == 0 )
{
push(@dellist,$reponame);
}
}
foreach my $del (@dellist)
{
my $delrepodir=$::base_repodir."/".$del ;
if ( -d $delrepodir )
{
my $delcmd="rm -Rf $delrepodir";
if ( system($delcmd) )
{
print "Failed to delete useless repo directory \n";
}
}
}
# Build the full kit tar file
my $buildtar_rc = &kit_buildtar;
@@ -134,6 +134,87 @@ sub get_latest_version
}
}
#--------------------------------------------------------------------------
=head3 get_latest_version_deb
Find the latest version in a list of debs with the same basename
Arguments:
- the repo location
- a list of debs with the same basename
Returns:
- name of deb
- undef
Example:
my $new_d = xCAT::BuildKitUtils->get_latest_version($repodir, \@rpmlist);
Comments:
=cut
#--------------------------------------------------------------------------
sub get_latest_version_deb
{
my ($class, $repodir, $debs) = @_;
my @deblist = @$debs;
my %localversions_hash = ();
my $file_name;
my %founddeb;
my $latest;
my $i = 0;
foreach my $deb (@deblist)
{
# include path
my $fulldebpath = "$repodir/$deb*";
chomp $deb;
# get the basename, version, and release for this deb
print "dpkg -I $repodir/$deb |grep Package|awk '{print \$2}'";
my $basenamedeb = `dpkg -I $repodir/$deb |grep Package|awk '{print \$2}'`;
chomp $basenamedeb;
my $versiondeb = `dpkg -I $repodir/$deb |grep Version|awk '{print \$2}'`;
chomp $versiondeb;
$founddeb{$basenamedeb}{$deb}{version}=$versiondeb;
$i++;
}
if ($i == 0)
{
print "error\n";
return undef;
}
foreach my $r (keys %founddeb ) {
# if more than one with same basename then find the latest
my $latestmatch="";
foreach my $fdeb (keys %{$founddeb{$r}} ) {
# if we already found a match in some other dir
if ($latestmatch) {
# then we need to figure out which is the newest
# if the $fdeb is newer than use iti
if ( ! xCAT::BuildKitUtils->testVersion_deb($founddeb{$r}{$fdeb}{version}, 'gt', $founddeb{$r}{$latestmatch}{version}) ) {
$latestmatch = $fdeb;
}
} else {
$latestmatch = $fdeb;
}
}
$latest=$latestmatch;
}
if ($i == 0)
{
print "Error: Could not determine the latest version for the following list of debs: @deblist\n";
return undef;
} else {
return ($latest);
}
}
#--------------------------------------------------------------------------
=head3 find_latest_pkg
@@ -160,6 +241,7 @@ sub find_latest_pkg
my @rpms;
my %foundrpm;
# need to check each pkgdir for the rpm(s)
# - if more than one match need to pick latest
# find all the matches in all the directories
@@ -223,6 +305,128 @@ sub find_latest_pkg
}
}
#--------------------------------------------------------------------------
=head3 find_latest_pkg_deb
Find the latest deb package give the deb name and a list of
possible package locations.
Arguments:
- a list of package directories
- the name of the deb
Returns:
- \@founddeblist
- undef
Example:
my $newrpm = xCAT::BuildKitUtils->find_latest_pkg_deb(\@pkgdirs, $debname);
Comments:
=cut
#--------------------------------------------------------------------------
sub find_latest_pkg_deb
{
my ($class, $pkgdirs, $debname) = @_;
my @pkgdirlist = @$pkgdirs;
my @debs;
my %founddeb;
# need to check each pkgdir for the deb(s)
# - if more than one match need to pick latest
# find all the matches in all the directories
foreach my $debdir (@pkgdirlist) {
my $ffile = $debdir."/".$debname;
if ( system("/bin/ls $ffile > /dev/null 2>&1") ){
# if not then skip to next dir
next;
} else {
# if so then get the details and add it to the %founddeb hash
my $cmd = "/bin/ls $ffile 2>/dev/null";
my $output = `$cmd`;
my @deblist = split(/\n/, $output);
if ( scalar(@deblist) == 0) {
next;
}
foreach my $r (@deblist) {
my $basename = `dpkg -I $r* |grep Package|awk '{print \$2}'|head -1`;
chomp $basename;
my $version = `dpkg -I $r* |grep Version|awk '{print \$2}'|head -1`;
chomp $version;
$founddeb{$basename}{$r}{version}=$version;
}
}
}
# for each unique deb basename
foreach my $r (keys %founddeb ) {
# if more than one with same basename then find the latest
my $latestmatch="";
foreach my $fdeb (keys %{$founddeb{$r}} ) {
# if we already found a match in some other dir
if ($latestmatch) {
# then we need to figure out which is the newest
# if the $fdeb is newer than use it
if ( ! xCAT::BuildKitUtils->testVersion_deb($founddeb{$r}{$fdeb}{version}, 'gt', $founddeb{$r}{$latestmatch}{version}) ) {
$latestmatch = $fdeb;
}
} else {
$latestmatch = $fdeb;
}
}
push(@debs, $latestmatch);
}
if (scalar(@debs)) {
return \@debs;
} else {
return undef;
}
}
#------------------------------------------------------------------------------
=head3 testVersion_deb
Compare version1 and version2 according to the operator and
return 1 0 or 0.
Arguments:
$version1
$operator
$version2
Returns:
1 or 0
Example:
Comments:
The return value is generated with the Require query
=cut
#-----------------------------------------------------------------------------
sub testVersion_deb
{
my ($class, $version1, $operator, $version2) = @_;
if ($::VERBOSE) {
print "dpkg --compare-versions $version1 $operator $version2 \n";
}
my $result =`dpkg --compare-versions $version1 $operator $version2`;
return $result;
}
#------------------------------------------------------------------------------
+2 -2
View File
@@ -210,11 +210,11 @@ Add product package rpms to a previously built kit tar file. This is used for p
=over 3
=item 0
=item <B>0
The command completed successfully.
=item 1
=item <B>1
An error has occurred.
@@ -21,7 +21,7 @@ set -e
case "$1" in
configure)
<<<INSERT_kitcomponent_postinstall_script_HERE>>>
if [ -f /tmp/<<<INSERT_kitcomponent_upgrade_flag_HERE>>> ]
if [ -f /tmp/<<<INSERT_kitcomponent_upgrade_flag_HERE>>> ]; then
<<<INSERT_kitcomponent_postupgrade_script_HERE>>>
rm /tmp/<<<INSERT_kitcomponent_upgrade_flag_HERE>>>
fi
@@ -17,10 +17,12 @@ set -e
case "$1" in
install)
<<<INSERT_kitcomponent_preinstall_script_HERE>>>
echo "preinstall processing"
;;
upgrade)
if [ -f /tmp/<<<INSERT_kitcomponent_upgrade_flag_HERE>>> ]
if [ -f /tmp/<<<INSERT_kitcomponent_upgrade_flag_HERE>>> ]; then
echo "preupgrade processing"
<<<INSERT_kitcomponent_preupgrade_script_HERE>>>
fi
;;
@@ -96,7 +96,8 @@ kit:
#
# osminorversion (optional) OS minor version. (ex. "4")
#
# osarch (mandatory) OS architecture. (ex. "x86_64")
# osarch (mandatory) OS architecture. (ex.redhat x86_64 should be "x86_64", Ubuntu Power LE should be "ppc64el",
# For Ubuntu Power LE, system arch is ppc64le, for ubuntu software package, should use "ppc64el",
#
# compat_osbasenames (optional) Comma-separated list of compatible
# OS distribution base names. (ex. "centos")
@@ -1,3 +1,21 @@
#!/bin/sh
echo "running sample-comp1 genimage_post script"
rpmdir="/opt/xcat/kits/<<<buildkit_WILL_INSERT_kit_basename_HERE>>>/<<<buildkit_WILL_INSERT_kitcomponent_name_HERE>>>"
if [[ ! -z "$installroot" ]]; then
if [ -n "`ls $installroot$rpmdir/*.deb 2> /dev/null`" ] ; then
dpkg -i --force-all --instdir=$installroot $installroot$rpmdir/*.deb
elif [ -n "`ls $installroot$rpmdir/*.rpm 2> /dev/null`" ] ; then
rpm --force --root $installroot -Uvh $installroot$rpmdir/*.rpm
fi
else
if [ -n "`ls $rpmdir/*.deb 2> /dev/null`" ] ; then
dpkg -i --force-all $rpmdir/*.deb
elif [ -n "`ls $rpmdir/*.rpm 2> /dev/null`" ] ; then
rpm --force -Uvh $rpmdir/*.rpm
fi
fi
exit 0
@@ -26,9 +26,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
<<<INSERT_kitcomponent_files_HERE>>>
%changelog
@@ -48,6 +45,11 @@ rm -rf $RPM_BUILD_ROOT
%preun
<<<INSERT_kitcomponent_preuninstall_script_HERE>>>
%files
%defattr(-,root,root)
<<<INSERT_kitcomponent_files_HERE>>>
%postun
<<<INSERT_kitcomponent_postuninstall_script_HERE>>>
+8 -2
View File
@@ -43,6 +43,7 @@ my $interactive;
my $onlyinitrd;
my $dryrun;
my $ignorekernelchk;
my $noupdate;
#-----------------------------------------------------------------------------
=head3 print_usage - usage message
@@ -55,8 +56,8 @@ sub print_usage
print "Usage:\n";
print " genimage\n\n";
print " genimage --dryrun\n\n";
print ' genimage -o <osver> [-a <arch>] -p <profile> -i <nodebootif> -n <nodenetdrivers> [--onlyinitrd] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] [--dryrun]'."\n\n";
print ' genimage [-o <osver>] [-a <arch>] [-p <profile>] [-i <nodebootif>] [-n <nodenetdrivers>] [--onlyinitrd] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] [--dryrun] <imagename>'."\n\n";
print ' genimage -o <osver> [-a <arch>] -p <profile> -i <nodebootif> -n <nodenetdrivers> [--onlyinitrd] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] [--dryrun] [--noupdate]'."\n\n";
print ' genimage [-o <osver>] [-a <arch>] [-p <profile>] [-i <nodebootif>] [-n <nodenetdrivers>] [--onlyinitrd] [-r <otherifaces>] [-k <kernelver>] [-g <krpmver>] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission <permission>] [--interactive] [--dryrun] [--noupdate] <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";
@@ -90,6 +91,7 @@ if (!GetOptions(
'onlyinitrd' => \$onlyinitrd,
'dryrun' => \$dryrun,
'ignorekernelchk' => \$ignorekernelchk,
'noupdate' => \$noupdate,
'h|help' => \$help,
'v|version' => \$version,
)) {
@@ -409,6 +411,10 @@ if ($ignorekernelchk) {
push @arg, "--ignorekernelchk";
}
if ($noupdate) {
push @arg, "--noupdate";
}
my $cmdref;
push (@{$cmdref->{arg}}, @arg);
$cmdref->{command}->[0] = "genimage";
+366 -160
View File
@@ -1,191 +1,397 @@
#!/usr/bin/perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
# Downloads/converts the xCAT docs on the sourceforge wiki to local HTML and PDF.
# Downloads/converts the xCAT docs on the sourceforge Allura wiki to local HTML and PDF.
# This script is not dependent on other xCAT code, so you can copy it to a machine
# that has internet access to run it. Before running this command, you must have
# wget, python, and pisa installed. See: http://sourceforge.net/apps/mediawiki/xcat/index.php?title=Editing_xCAT_Documentation_Pages#Converting_Wiki_Pages_to_HTML_and_PDFs .
# curl, pandoc, and latex installed. See: http://sourceforge.net/p/xcat/wiki/Editing_and_Downloading_xCAT_Documentation/#converting-wiki-pages-to-html-and-pdfs
# Note: do not use the --upload option, unless your machine has authority to write to http://xcat.sourceforge.net/doc/ .
# You also need to set $UPLOADUSER to your sourceforge user.
# You also need to set $UPLOADUSER to your sourceforge user:
my $UPLOADUSER = 'bp-sawyers';
#BEGIN
#{
# $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr';
#}
use strict;
#use lib "$::XCATROOT/lib/perl";
#use xCAT::Utils;
use Getopt::Long;
#use File::Path;
use Cwd;
#use Data::Dumper;
use JSON;
use List::Util qw[max];
# URL for the xCAT Allura wiki API markdown on SourceForge
my $SF_URL='http://sourceforge.net/rest';
my $WIKI_URL=$SF_URL.'/p/xcat/wiki/';
# Update this list if you group any xcat docs on a separate page such that they
# are no longer linked from the main doc page:
my @INDEXDOCS = ('XCAT_Documentation',
'Power_775_Cluster_Documentation',
'Highly_Available_Management_Node',
'Mixed_Cluster_Support',
'IBM_HPC_Stack_in_an_xCAT_Cluster');
# Update this list if you group any xcat docs on a separate page such that they are no longer linked from the
# main doc page.
my @indexdocs = ('XCAT_Documentation', 'Power_775_Cluster_Documentation', 'Highly_Available_Management_Node', 'Mixed_Cluster_Support', 'IBM_HPC_Stack_in_an_xCAT_Cluster');
#my $VERSION;
my $HELP;
my $UPLOAD;
my $UPLOADONLY;
my $IGNOREERRORS;
my $CONTINUE;
my $SINGLE_DOC;
my $VERBOSE;
my $usage = sub {
my $exitcode = shift @_;
print "Usage: getxcatdocs [-?|-h|--help] [-v|--verbose] [-u|--upload] [--uploadonly] [<destination-dir>]\n";
exit $exitcode;
};
# Process the cmd line args
Getopt::Long::Configure("bundling");
#Getopt::Long::Configure("pass_through");
Getopt::Long::Configure("no_pass_through");
if (!GetOptions('h|?|help' => \$HELP, 'v|verbose' => \$VERBOSE, 'u|upload' => \$UPLOAD, 'uploadonly' => \$UPLOADONLY )) { $usage->(1); }
if ($HELP) { $usage->(0); }
#if ($VERSION) {
#print xCAT::Utils->Version(), "\n";
# exit;
#}
if ($^O =~ /^aix/i) { die "Error: this command is not yet supported on AIX.\n"; }
my $destdir = scalar(@ARGV) ? $ARGV[0] : '.';
chdir($destdir) or die "Can not cd to $destdir: $!\n";
#my $docdir = $ENV{'PWD'};
# Download the HTML docs and convert them all to pdfs
my @dir;
if (!$UPLOADONLY) {
@dir = gethtmldocs('html');
convert2pdf('pdf', \@dir);
}
# tar/compress
my $date=`date +%Y%m%d%H%M`;
chop $date;
my $docname="xcat-docs-snap$date.tar.gz";
#system('pwd');
my $cmd = "tar -zcf $docname html pdf 2>&1";
verbose($cmd);
system($cmd) == 0 or die "Error running $cmd: $!, rc=$?";
# Optionally upload the tarball to sourceforge
if ($UPLOAD || $UPLOADONLY) {
my $UPLOADUSER = 'bp-sawyers';
my $count = 1;
#my $cmd = "rsync -v $docname $UPLOADUSER," . 'xcat@web.sourceforge.net:htdocs/doc/';
my $cmd = "rsync -v $docname $UPLOADUSER," . 'xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/doc/';
print "$cmd\n";
while ($count<=5 && system("$cmd 2>&1")) { $count++; }
}
exit 0;
my $MDDIR;
my $HTMLDIR;
my $PDFDIR;
my $IMAGEDIR;
my %LOADEDDOCS;
sub verbose { if ($VERBOSE) { print shift, "\n"; } }
my $usage = sub {
my $exitcode = shift @_;
print "Usage: getxcatdocs [-?|-h|--help] \n";
print "Usage: getxcatdocs [-v|--verbose] [-u|--upload] [--uploadonly] [-U|--uploaduser sourceforge_id] [-i|--ignoreerrors] [<destination-dir>]\n";
print "Usage: getxcatdocs [-v|--verbose] [-c|--continue] [-d|--doc single_doc] [-i|--ignoreerrors] [<destination-dir>]\n";
exit $exitcode;
};
# Main processing
# Process the cmd line args
Getopt::Long::Configure("bundling");
#Getopt::Long::Configure("pass_through");
Getopt::Long::Configure("no_pass_through");
if (!GetOptions(
'h|?|help' => \$HELP,
'v|verbose' => \$VERBOSE,
'u|upload' => \$UPLOAD,
'uploadonly' => \$UPLOADONLY,
'uploaduser' => \$UPLOADUSER,
'c|continue' => \$CONTINUE,
'i|ignoreerrors' => \$IGNOREERRORS,
'd|doc=s' => \$SINGLE_DOC ))
{ $usage->(1); }
if ($HELP) { $usage->(0); }
if ($^O =~ /^aix/i) { die "Error: this command is not yet supported on AIX.\n"; }
my $DESTDIR = scalar(@ARGV) ? $ARGV[0] : '.';
chdir($DESTDIR) or die "Can not cd to $DESTDIR: $!\n";
my $json = JSON->new();
if ($SINGLE_DOC) {
$MDDIR = '.';
$HTMLDIR = '.';
$PDFDIR = '.';
$IMAGEDIR = '.';
download_doc($SINGLE_DOC);
convert_doc($SINGLE_DOC);
exit;
}
# Download the HTML docs and convert them all to pdfs
if (!$UPLOADONLY) { gethtmldocs(); }
# tar/compress
my $date=`date +%Y%m%d%H%M`;
chop $date;
my $docname="xcat-docs-snap$date.tar.gz";
my $cmd = "tar -zcf $docname html pdf images 2>&1";
verbose($cmd);
system($cmd) == 0 or die "Error running $cmd: $!, rc=$?";
# Optionally upload the tarball to sourceforge
if ($UPLOAD || $UPLOADONLY) {
my $count = 1;
#my $cmd = "rsync -v $docname $UPLOADUSER," . 'xcat@web.sourceforge.net:htdocs/doc/';
my $cmd = "rsync -v $docname $UPLOADUSER," . 'xcat@web.sourceforge.net:/home/frs/project/x/xc/xcat/doc/';
print "$cmd\n";
while ($count<=5 && system("$cmd 2>&1")) { $count++; }
}
exit 0;
# Download all of the html docs from several "index" docs
sub gethtmldocs {
my $dir = shift;
my $savedir = getcwd();
#File::Path::make_path($dir);
mkdir($dir);
chdir($dir);
#system('pwd');
unlink <*>; # delete all the files in the dir, in case they previously ran this
#system('ls');
my $indexes = '';
foreach my $index (@indexdocs) {
$indexes .= qq('http://sourceforge.net/apps/mediawiki/xcat/index.php?title=$index&printable=yes' );
}
print "Downloading the xCAT wiki documentation to $dir, from: $indexes ...\n";
runwget($indexes);
# Remove the funny chars from the links to other docs and rename the docs
#my $sedcmd = q(sed -i 's/<a href="\/apps\/mediawiki\/xcat\/index.php?title/<a href="index.php%3Ftitle/' *);
# sed -i 's/href="index.php%3Ftitle=/href="/g' index.php\?title\=
# sed -i 's/<a href="\([^"]*\)"/<a href="\1.html"/'
# This searches for '<a href="index.php?title=' and then all text before a '"' or '#', and then removes the front part and add .html on the end
# Note: this does not convert the 'MediaWiki:*' files because they are used in <link> tags, but converting them does not seem to do any good anyway.
my $cmd = q(sed -i 's/<a href="index.php?title=\\([^"#]*\\)\\("\|#\\)/<a href="\1.html\2/g' *);
verbose($cmd);
system($cmd) == 0 or die "Error running $cmd: $!, rc=$?";
# get the list of docs
opendir(DIR, '.') or die "Error: could not read the just created html directory.\n";
#my @docs = grep /^index.php\?title=/, readdir(DIR); # /
my @docs;
foreach my $f (readdir(DIR)) {
if ($f !~ /^index.php\?title=/ || $f =~ /^index.php\?title=MediaWiki:/) { next; }
my $newf = $f;
$newf =~ s/^index.php\?title=//;
if ($newf !~ /\./) { $newf .= '.html'; }
verbose("Renaming $f to $newf");
rename($f, $newf);
push @docs, $newf;
}
close(DIR);
chdir($savedir);
return @docs;
$MDDIR = 'md';
$HTMLDIR = 'html';
$PDFDIR = 'pdf';
$IMAGEDIR = 'images';
mkdir($MDDIR);
mkdir($HTMLDIR);
mkdir($PDFDIR);
mkdir($IMAGEDIR);
#delete all the files in the dirs in case they previously ran this
if ($CONTINUE) {
print "CONTINUING with files already in $MDDIR";
my @mdfiles = glob "$MDDIR/*.md";
foreach my $mdf (@mdfiles) {
$mdf =~ s/^$MDDIR\///;
$mdf =~ s/\.md//;
$LOADEDDOCS{$mdf}=1;
}
} else {
unlink <$MDDIR/*>;
unlink <$HTMLDIR/*>;
unlink <$PDFDIR/*>;
unlink <$IMAGEDIR/*>;
}
print "\nDownloading and converting the xCAT wiki document list from $WIKI_URL ...\n";
foreach my $index (@INDEXDOCS) {
my @related_docs = download_doc($index);
foreach my $docref (@related_docs) {
my $docref_name = $docref;
$docref_name =~ s/\/.*\/(.+)\/$/$1/;
download_doc($docref_name);
}
}
foreach my $doc (keys %LOADEDDOCS) {
convert_doc($doc);
}
return;
}
# Convert to pdf
sub convert2pdf {
my ($dir, $files) = @_;
my $savedir = getcwd();
#File::Path::make_path($dir);
mkdir($dir);
chdir($dir);
if (system('which xhtml2pdf >/dev/null 2>&1')) { die "xhtml2pdf is not installed. See http://sourceforge.net/apps/mediawiki/xcat/index.php?title=Editing_xCAT_Documentation_Pages#Converting_Wiki_Pages_to_HTML_and_PDFs .\n"; }
unlink <*>; # delete all the files in the dir, in case they previously ran this
foreach my $file (@$files) {
#if ($file =~ /^index.php\?title=MediaWiki:/ || $file eq 'index.php?title=XCAT_Documentation') { next; }
if ($file eq 'XCAT_Documentation') { next; }
#my ($docname) = $file =~ /^index.php\?title=(.+)$/;
$file =~ s/\.html$//;
print "Converting $file to PDF format...\n";
my $url = 'http://sourceforge.net/apps/mediawiki/xcat/index.php?title=' . $file . '&printable=yes';
my $destfile = "$file.pdf";
my $cmd = "xhtml2pdf '$url' '$destfile' ";
runh2p($cmd);
}
chdir($savedir);
sub download_doc {
my $doc_name = shift;
if ( $LOADEDDOCS{$doc_name} ) { return; }
verbose("processing $doc_name");
$LOADEDDOCS{$doc_name}=1;
my $curlcmd = "curl --retry 5 -X GET $WIKI_URL/$doc_name";
verbose($curlcmd);
my $docjson = `$curlcmd`;
if ($? && !$IGNOREERRORS) { die "error encountered in $curlcmd \n";}
my $jsout = $json->decode($docjson);
foreach my $att (@{$jsout->{attachments}}) {
my $wgetcmd = "wget -P $IMAGEDIR/ $att->{url}";
verbose($wgetcmd);
system($wgetcmd);
if ($? && !$IGNOREERRORS) { die "error encountered in $wgetcmd \n";}
}
open(MDFILE, ">$MDDIR/${doc_name}.md") or die "Could not open >$MDDIR/${doc_name}.md";
print MDFILE $jsout->{text};
close MDFILE;
return @{$jsout->{related_artifacts}};
}
sub convert_doc {
my $doc_name = shift;
open(MDFILE, "<$MDDIR/${doc_name}.md") or die "Could not open <$MDDIR/${doc_name}.md";
my @doc_lines = <MDFILE>;
close MDFILE;
my $doc_text = join('',@doc_lines);
$doc_text = process_includes($doc_text,0);
if ($doc_text =~ /begin_xcat_table/) {
open(MDFILE, ">$MDDIR/${doc_name}.md") or die "Could not open >$MDDIR/${doc_name}.md";
print MDFILE $doc_text;
close MDFILE;
convert_tables($doc_name);
open(MDFILE, "<$MDDIR/${doc_name}.md") or die "Could not open <$MDDIR/${doc_name}.md";
@doc_lines = <MDFILE>;
close MDFILE;
$doc_text = join('',@doc_lines);
}
## Make image refs local
$doc_text =~ s/\!\[\]\(.+\/(.+)\.png\)/\!\[\]\(\.\.\/$IMAGEDIR\/$1\.png\)/g;
$doc_text =~ s/\!\[\]\(.+\/(.+)\.PNG\)/\!\[\]\(\.\.\/$IMAGEDIR\/$1\.PNG\)/g;
$doc_text =~ s/\!\[\]\(.+\/(.+)\.jpg\)/\!\[\]\(\.\.\/$IMAGEDIR\/$1\.jpg\)/g;
$doc_text =~ s/\[img src=(.+)\.png\]/\!\[\]\(\.\.\/$IMAGEDIR\/$1\.png\)/g;
$doc_text =~ s/\[img src=(.+)\.PNG\]/\!\[\]\(\.\.\/$IMAGEDIR\/$1\.PNG\)/g;
$doc_text =~ s/\[img src=(.+)\.jpg\]/\!\[\]\(\.\.\/$IMAGEDIR\/$1\.jpg\)/g;
## Remove [TOC] entries
$doc_text =~ s/\[TOC\]//g;
open(MDFILE, ">$MDDIR/${doc_name}.md") or die "Could not open >$MDDIR/${doc_name}.md";
print MDFILE $doc_text;
close MDFILE;
my $pandoccmd = "pandoc -s --toc $MDDIR/${doc_name}.md -o $HTMLDIR/${doc_name}.html";
verbose($pandoccmd);
system($pandoccmd);
if ($? && !$IGNOREERRORS) { die "error encountered in $pandoccmd \n";}
# This rename is probably a hack, but I didn't want to take the time to
# figure out what was going on:
# pandoc does different processing if target filetype is html
# but all internal refs only work in browser when there is no html filetype
rename "$HTMLDIR/${doc_name}.html","$HTMLDIR/${doc_name}";
$doc_text =~ s/\!\[\]\(\.\.\/$IMAGEDIR\/(.+)\.png\)/\!\[\]\(\.\/$IMAGEDIR\/$1\.png\)/g;
$doc_text =~ s/\!\[\]\(\.\.\/$IMAGEDIR\/(.+)\.PNG\)/\!\[\]\(\.\/$IMAGEDIR\/$1\.PNG\)/g;
$doc_text =~ s/\!\[\]\(\.\.\/$IMAGEDIR\/(.+)\.jpg\)/\!\[\]\(\.\/$IMAGEDIR\/$1\.jpg\)/g;
open(MDFILE, ">$MDDIR/${doc_name}.md") or die "Could not open >$MDDIR/${doc_name}.md";
print MDFILE $doc_text;
close MDFILE;
my $pandoccmd2 = "pandoc --toc $MDDIR/${doc_name}.md -o $PDFDIR/${doc_name}.pdf";
verbose($pandoccmd2);
system($pandoccmd2);
if ($? && !$IGNOREERRORS) { die "error encountered in $pandoccmd2 \n";}
}
# Run the wget cmd and filter out some of the silly output
sub runwget {
my $index = shift;
# options we might consider: --html-extension --restrict-file-names=windows --cut-dirs=3
# options that do not work: --relative
#my $rejectlist = q('*title=Special:*,*title=Talk:*,*title=-&*,*title=HowTos,*title=Main_Page,*title=MediaWiki:*,*title=Release_Notes,*title=Wish_List_for_xCAT_2,*&action=edit*,*&action=history*,*&printable=yes*,*&oldid=*,index.html,opensearch_desc.php,xcat,login.php,support');
my $rejectlist = q('*title=Special:*,*title=Talk:*,*title=-&*,*title=HowTos,*title=Main_Page,*title=Release_Notes,*title=Wish_List_for_xCAT_2,*&action=edit*,*&action=history*,*&printable=yes*,*&oldid=*,index.html,opensearch_desc.php,xcat,login.php,support');
my $cmd = qq(wget --recursive --convert-links --no-verbose --progress=bar --level=1 --page-requisites --no-parent --no-host-directories --no-directories --no-clobber --execute robots=off --post-data='printable=yes' --reject $rejectlist $index);
verbose($cmd);
open(OUT, "$cmd 2>&1 |") || die "can't fork $cmd: $!\n";
while (<OUT>) {
if (/URL:https*:\/\/sourceforge\.net.+\s+->\s+\"(\S+)\"\s+\[/) { print "Downloaded $1.\n"; }
else { print; }
}
close OUT || print "Error running $cmd: $! $?\n";
sub process_includes {
my $doc_text = shift;
my $include_nest = shift;
if ($include_nest++ > 10) { die "nested include processing greater than 10. Infinite recursion???"; }
while (1) {
if ($doc_text =~ /\[\[(\s*)include (\s*)ref=(\s*)(.+)(\s*)\]\]/) {
my $next_include = $4;
download_doc($next_include);
open(INCLDFILE, "<$MDDIR/${next_include}.md") or die "Could not open <$MDDIR/${next_include}.md";
my @include_lines = <INCLDFILE>;
close INCLDFILE;
# my $include_text = join('\n', @include_lines);
my $include_text = join('', @include_lines);
$include_text = process_includes($include_text,$include_nest);
$doc_text =~ s/\[\[(\s*)include (\s*)ref=(\s*)$next_include(\s*)\]\]/$include_text/g;
} else {
last;
}
}
return $doc_text;
}
# Run the xhtml2pdf cmd and filter out some of the silly output
sub runh2p {
my $cmd = shift;
verbose($cmd);
open(OUT, "$cmd 2>&1 |") || die "can't fork $cmd: $!\n";
while (<OUT>) {
next if /DeprecationWarning:\sthe sets module is deprecated/;
next if /from sets import ImmutableSet/;
next if /^\s*import sets\s*$/;
next if /^Converting\ssourceforge.net/;
print;
}
close OUT || print "Error running $cmd: $! $?\n";
sub convert_tables {
my $doc_name=shift;
my $infile="$MDDIR/${doc_name}.md";
my $outfile=$infile;
open(MDFILE, "<$infile") or die "Could not open <$infile";
my @inlines=<MDFILE>;
close MDFILE;
my @outlines;
my @tablines;
my $in_comment=0;
my $xcat_table=0;
my $numcols=1;
my @colwidths=(0);
my $tabcount=0;
verbose("converting tables in $doc_name");
foreach my $line (@inlines) {
if ($line =~ /\<\!---/) { $in_comment=1; next; }
if ($in_comment) {
if ($line =~ /begin_xcat_table/) {$xcat_table=1; next;}
if ($xcat_table) {
if ($line =~ /numcols=(\d+)/) { $numcols=$1; next;}
if ($line =~ /colwidths=([\d,]+)/) { @colwidths=split(',',$1); next;}
}
if ($line =~ /end_xcat_table/) {
my $separator = '+';
foreach my $c (@colwidths) {
if ($c > 0) { $separator .= '-' x $c; }
$separator .= '+';
}
$separator .= "\n";
my $headsep = $separator;
$headsep =~ s/-/=/g;
my $rowline = $separator;
$rowline =~ s/-/ /g;
my $nosep=0;
foreach my $tabline(@tablines) {
if ($tabline =~ /^\s*$/) { next;}
if ($tabline =~ /^\-\-/) {
push (@outlines,$headsep);
$nosep = 1;
next;
}
if ($nosep) { $nosep=0;} else {push (@outlines,$separator);}
$tabline =~ s/^\s*\|//;
my @vals = split (/\|/,$tabline);
my $last_cell_line=0;
my $colnum=0;
my @tabrow;
foreach my $c (@colwidths) {
if ($c > 0) {
my $colval=$vals[$colnum];
$colval =~ s/(\s*)$//;
my $vallen = length($colval);
my $cell_line=0;
while ($vallen > $c) {
$tabrow[$cell_line++][$colnum] = substr($colval,0,$c);
$vallen -= $c;
$colval = substr($colval,$c,$vallen);
}
$tabrow[$cell_line][$colnum] = substr($colval,0,$vallen);
if ($vallen < $c) {
$tabrow[$cell_line][$colnum] .= " " x ($c-$vallen);
}
$last_cell_line = max($cell_line,$last_cell_line);
}
$colnum++;
}
my @rowlines;
for (my $i=0;$i<=$last_cell_line;$i++) {
for (my $j=0;$j<=$numcols-1;$j++) {
$rowlines[$i] .= "|";
if ($tabrow[$i][$j]) { $rowlines[$i] .= $tabrow[$i][$j]; }
else { $rowlines[$i] .= " " x $colwidths[$j]; }
}
$rowlines[$i] .= "|\n";
}
push (@outlines,@rowlines);
}
push (@outlines,$separator);
# reset to process next table
@tablines = ();
$xcat_table=0; $numcols=1;@colwidths=(0);next;
}
if ($line =~ /--\>/) {$in_comment=0;next;}
next;
}
if ($xcat_table) { push (@tablines,$line); next; }
push (@outlines,$line);
next;
}
open(MD2FILE, ">$outfile") or die "Could not open >$outfile";
print MD2FILE @outlines;
close MD2FILE;
return;
}
+64 -18
View File
@@ -147,29 +147,41 @@ if ( -e "/etc/debian_version" ){
# determine whether redhat or sles
$::linuxos = xCAT::Utils->osver();
#
# check to see if mysql is installed
#
my $cmd = "rpm -qa | grep -i perl-DBD-mysql";
if ( $::debianflag ){
$cmd = "dpkg -l | grep mysql-server";
}
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $message =
"\nMySQL perl DBD is not installed. If on AIX, it should be first obtained from the xcat dependency tarballs and installed before running this command.\n If on Linux, install from the OS CDs.";
xCAT::MsgUtils->message("E", " $cmd failed. $message");
exit(1);
}
# is this MariaDB or MySQL
$::MariaDB=0;
$cmd = "rpm -qa | grep -i mariadb"; # check this is MariaDB not MySQL
my $cmd;
if ( $::debianflag ){
$cmd = "dpkg -l | grep mariadb";
} else {
$cmd = "rpm -qa | grep -i mariadb"; # check this is MariaDB not MySQL
}
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0) {
$::MariaDB=1;
}
#
# check to see if mysql is installed
#
$cmd = "rpm -qa | grep -i perl-DBD-mysql";
my $msg = "\nMySQL perl DBD ";
if ( $::debianflag ){
if ( $::MariaDB ){
$cmd = "dpkg -l | grep -i mariadb-server";
$msg = "\nmariadb-server ";
} else {
$cmd = "dpkg -l | grep mysql-server";
$msg = "\nmysql-server ";
}
}
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $message =
"\n$msg is not installed. If on AIX, it should be first obtained from the xcat dependency tarballs and installed before running this command.\n If on Linux, install from the OS CDs.";
xCAT::MsgUtils->message("E", " $cmd failed. $message");
exit(1);
}
# check to see if MySQL is running
$::mysqlrunning = 0;
$::xcatrunningmysql = 0;
@@ -187,6 +199,29 @@ if (grep(/$mysqlcheck/, @output))
}
$::mysqlrunning = 1;
}
#for ubuntu 14, after install mysql/maria server, the mysql will running
#need to stop mysql in order to setup init xcat mysql
if ( $::debianflag ){
$cmd = "pidof mysqld";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0)
{
if ($::INIT)
{
my $ret=xCAT::Utils->stopservice("mysql");
if ($ret != 0)
{
xCAT::MsgUtils->message("E", " failed to stop mysql/mariadb.");
exit(1);
}
}
else {
$::mysqlrunning = 1;
}
}
}
if (-e ("/etc/xcat/cfgloc")) # check to see if xcat is using mysql
{ # cfgloc exists
$cmd = "fgrep mysql /etc/xcat/cfgloc";
@@ -883,8 +918,11 @@ sub mysqlstart
else
{
if ($::MariaDB==1) { # running MariaDB
#$cmd = "service mariadb start";
$ret=xCAT::Utils->startservice("mariadb");
if ($::linuxos =~ /rh.*/) {
$ret=xCAT::Utils->startservice("mariadb");
} else { # sles
$ret=xCAT::Utils->startservice("mysql");
}
} else { # it is mysql
@@ -993,7 +1031,15 @@ sub mysqlreboot
{
if ($::MariaDB==1 ) { # MariaDB not MySQL
if ($::linuxos =~ /rh.*/) {
$cmd = "chkconfig mariadb on";
} else { #sles
$cmd = "chkconfig mysql on";
if ( $::debianflag ){
$cmd = "update-rc.d mysql defaults";
}
}
} else { # mysql
if ($::linuxos =~ /rh.*/)
{
+20 -6
View File
@@ -336,14 +336,14 @@ if (($INIT) && ($xcatrunningpgsql == 0))
#
# Init Pg database and setup pg_hba.conf and postgresql.conf
#
&initpgdb;
&initpgdb;
#
# Start Postgresql server
#
if ($pgsqlrunning == 0) # if not already running
{
&pgstart;
&pgstart(0);
}
#
@@ -705,6 +705,7 @@ sub runpgcmd_chkoutput
sub initpgdb
{
my $cmd;
my $dbrestart = 0;
# init the database, must su to postgres
@@ -759,6 +760,7 @@ sub initpgdb
xCAT::MsgUtils->message("E", " $cmd failed.");
exit(1);
}
$dbrestart = 1;
}
# setup the postgresql.conf file
@@ -800,6 +802,7 @@ sub initpgdb
$cmd = qq~echo log_min_messages = notice >> $pgconf~;
`$cmd`;
}
$dbrestart = 1;
}
# make sure everything in /var/lib/pgsql/data is owned by postgres
if ($::installdatadir) { # for protection
@@ -819,6 +822,11 @@ sub initpgdb
}
}
if ($dbrestart){
&pgstart(1);
}
}
#-----------------------------------------------------------------------------
@@ -826,14 +834,18 @@ sub initpgdb
=head3 pgstart
Start the Postgresql server
Start or restart the Postgresql server
startflg = 0 start postgresql
startflg = 1 restart postgresql
=cut
#-----------------------------------------------------------------------------
sub pgstart
{
my $startflg = shift;
my $cmd;
my $ret=0;
xCAT::MsgUtils->message("I", "Starting the PosgreSQL Server");
@@ -853,9 +865,11 @@ sub pgstart
#$cmd = "service postgresql start";
$cmd = "postgresql";
}
#system($cmd)
#if ($? > 0) {
$ret=xCAT::Utils->startservice($cmd);
if ($startflg == 0) {
$ret=xCAT::Utils->startservice($cmd);
} else {
$ret=xCAT::Utils->restartservice($cmd);
}
if ($ret != 0) {
xCAT::MsgUtils->message("E", " failed to start $cmd.");
exit(1);
+11 -1
View File
@@ -59,6 +59,11 @@ if ($::NOEXPAND) { # this is when ppping is calling us and has already expanded
@nodes = split(/,/, $noderange);
}
else { # the normal case of the user running the cmd - expand the noderange using xcatd
my %sslargs;
if (defined($ENV{'XCATSSLVER'})) {
$sslargs{SSL_version} = $ENV{'XCATSSLVER'};
}
my $client = IO::Socket::SSL->new(
PeerAddr=>$xcathost,
SSL_key_file=> xCAT::Utils->getHomeDir()."/.xcat/client-cred.pem",
@@ -66,6 +71,7 @@ else { # the normal case of the user running the cmd - expand the noderange us
SSL_ca_file => xCAT::Utils->getHomeDir()."/.xcat/ca.pem",
SSL_use_cert => 1,
SSL_verify_mode => 1,
%sslargs,
);
die "Connection failure: $!\n" unless ($client);
my %cmdref = (command => 'noderange', noderange => $noderange);
@@ -169,7 +175,11 @@ sub nmap_pping {
foreach (@$nodes) {
$deadnodes{$_}=1;
}
open (FPING, "nmap -PE --system-dns --send-ip -sP ".join(' ',@$nodes). " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
# get additional options from site table
my @nmap_options = xCAT::TableUtils->get_site_attribute("nmapoptions");
my $more_options = $nmap_options[0];
open (FPING, "nmap -PE --system-dns --send-ip -sP $more_options ".join(' ',@$nodes). " 2> /dev/null|") or die("Cannot open nmap pipe: $!");
my $node;
while (<FPING>) {
if (/Host (.*) \(.*\) appears to be up/) {
+6
View File
@@ -77,12 +77,18 @@ my $noderange = $ARGV[0];
my @user = getpwuid($>);
my $homedir=$user[7];
my %sslargs;
if (defined($ENV{'XCATSSLVER'})) {
$sslargs{SSL_version} = $ENV{'XCATSSLVER'};
}
my $client = IO::Socket::SSL->new(
PeerAddr=>$xcathost,
SSL_key_file=>$homedir."/.xcat/client-cred.pem",
SSL_cert_file=>$homedir."/.xcat/client-cred.pem",
SSL_ca_file => $homedir."/.xcat/ca.pem",
SSL_use_cert => 1,
%sslargs,
#SSL_verify_mode => 1,
);
die "Connection failure: $!\n" unless ($client);
-1
View File
@@ -137,7 +137,6 @@ sub processoutput { #This way, one arbiter handles output, no interrupting
sub scpnode {
my $inputs = shift;
my $nodehdl = shift;
my $out = shift;
my $node = shift;
my $in;
#my $args = join(" ",@_);
+27 -3
View File
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Provide serial console access to nodes
@@ -21,7 +21,11 @@ if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help"
exit 0
fi
if [ "$1" = "-v" ]; then
echo "Version 2.8"
echo "Version 2.9"
exit 0
fi
if [ "$1" = "--version" ]; then
echo "Version 2.9"
exit 0
fi
@@ -48,7 +52,27 @@ if [ -n "$2" ]; then
fi
fi
if [ -f "/usr/bin/console" ] || [ -f "/bin/console" ]; then
if [ -x "/opt/confluent/bin/confetty" ] || [ -x "/usr/bin/confetty" ] || [ -x "/usr/local/bin/confetty" ]; then
#use confluent
CONFETTY="confetty"
if [ -x "/opt/confluent/bin/confetty" ]; then
CONFETTY="/opt/confluent/bin/confetty"
fi
if [ ! -z "$CONSCONTROLPATH" ]; then
CONSCONTROLPATH="-c $CONSCONTROLPATH"
fi
if [ -z "$CONSERVER" ]; then
CONSERVER=`nodels $1 nodehm.conserver 2>/dev/null | awk -F: '{print $2}' | tr -d ' '`
fi
if [ -z "$CONSERVER" ]; then
CONSERVER=$XCATHOST
fi
if [ ! -z "$CONSERVER" ]; then
CONSERVER="-s $CONSERVER"
fi
$CONFETTY $CONSCONTROLPATH $CONSERVER $1
elif [ -f "/usr/bin/console" ] || [ -f "/bin/console" ]; then
#use conserver
if [ -z "$CONSERVER" ]; then
CONSERVER=`nodels $1 nodehm.conserver 2>/dev/null | awk -F: '{print $2}' | tr -d ' '`
+33 -8
View File
@@ -3,6 +3,8 @@
use Getopt::Long qw(:config getopt_compat pass_through);
use File::Basename;
BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; }
use IO::Socket::UNIX;
use Time::HiRes qw/sleep/;
use lib "$::XCATROOT/lib/perl";
use xCAT::Client;
#use Data::Dumper;
@@ -16,9 +18,11 @@ my $sb;
my $tilefact;
my $xrm="-xrm xterm.mainMenu.*.font:fixed -xrm xterm.vtMenu.*.font:fixed -xrm xterm.fontMenu.*.font:fixed -xrm xterm -xrm xterm.vt100.font6:grvga.737";
my $font = "5x7";
my $sizegeometry;
GetOptions(
#'sb' => \$sb,
'tile|t:i' => \$tilefact,
'geometry|g:s' => \$sizegeometry,
#'font|f=s' => \$font
);
my $noderange = $ARGV[$#ARGV];
@@ -54,7 +58,6 @@ foreach (@nodes) {
$conservers{$_} =~ s/:.*//;
next;
}
$conservers{$_} = 'localhost';
}
@@ -82,7 +85,7 @@ if (defined($tilefact)) {
$screenheight=$1;
}
}
$rootinf = `xwininfo -name "Top Panel"`;
$rootinf = `xwininfo -name "Top Panel" 2> /dev/null`;
foreach (split /\n/,$rootinf) {
if (/-geometry\s+([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+)/) {
if ($1 > 640 and $2 < 480 and $3 == 0 and $4 == 0) {
@@ -91,7 +94,7 @@ if (defined($tilefact)) {
}
}
if ($panel_pad == 0) {
$rootinf = `xwininfo -name "Top Expanded Edge Panel"`;
$rootinf = `xwininfo -name "Top Expanded Edge Panel" 2> /dev/null`;
foreach (split /\n/,$rootinf) {
if (/-geometry\s+([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+)/) {
if ($1 > 640 and $2 < 480 and $3 == 0 and $4 == 0) {
@@ -102,9 +105,25 @@ if (defined($tilefact)) {
}
system("xterm $xrm -bg black -fg white -title $firstnode -n $firstnode -geometry +0+0 ".join(" ",@ARGV)." -e /bin/bash -c \"$mydir/xtcd.pl ".$ENV{DISPLAY}." $firstnode $firstnode & let SDATE=`date +%s`+5; $mydir/rcons $firstnode ".$conservers{$firstnode}."; if [ \\\$SDATE -gt \\`date +%s\\` ]; then echo Press enter to close; read SDATE; fi \" &");
sleep(2); #Give time for window manager to figure out everything
my $xinfo = `xwininfo -name $firstnode`;
$ENV{CONSCONTROLPATH} = "/tmp/wconscontrol.$firstnode.$$";
system("xterm $xrm -bg black -fg white -title $firstnode -n $firstnode -geometry $sizegeometry+0+0 ".join(" ",@ARGV)." -e /bin/bash -c \"/bin/true ".$ENV{DISPLAY}." $firstnode $firstnode & let SDATE=`date +%s`+5; $mydir/rcons $firstnode ".$conservers{$firstnode}."; if [ \\\$SDATE -gt \\`date +%s\\` ]; then echo Press enter to close; read SDATE; fi \" &");
$ENV{CONSCONTROLPATH} = "";
my $remainwait = 2;
while (not -S "/tmp/wconscontrol.$firstnode.$$" and $remainwait > 0) {
sleep(0.1);
$remainwait -= 0.1;
}
my $xinfo;
if (-S "/tmp/wconscontrol.$firstnode.$$") { # confluent mode
my $controlchannel = IO::Socket::UNIX->new(Type=>SOCK_STREAM(), Peer => "/tmp/wconscontrol.$firstnode.$$");
print $controlchannel "GETWINID\n";
my $winid = <$controlchannel>;
$winid = <$controlchannel>;
$xinfo = `xwininfo -id $winid`;
} else {
$xinfo = `xwininfo -name $firstnode`;
}
my @xinfl = split(/\n/,$xinfo);
my $side_pad;
my $wmxo;
@@ -138,7 +157,11 @@ if (defined($tilefact)) {
$currx=0;
}
} else {
system("xterm $xrm -bg black -fg white -title $firstnode -n $firstnode ".join(" ",@ARGV)." -e /bin/bash -c \"$mydir/xtcd.pl ".$ENV{DISPLAY}." $firstnode $firstnode & let SDATE=`date +%s`+5; $mydir/rcons $firstnode ".$conservers{$firstnode}."; if [ \\\$SDATE -gt \\`date +%s\\` ]; then echo Press enter to close; read SDATE; fi\" &");
my $geo;
if ($sizegeometry) {
$geo = "-g $sizegeometry ";
}
system("xterm $xrm $geo-bg black -fg white -title $firstnode -n $firstnode ".join(" ",@ARGV)." -e /bin/bash -c \"$mydir/xtcd.pl ".$ENV{DISPLAY}." $firstnode $firstnode & let SDATE=`date +%s`+5; $mydir/rcons $firstnode ".$conservers{$firstnode}."; if [ \\\$SDATE -gt \\`date +%s\\` ]; then echo Press enter to close; read SDATE; fi\" &");
}
my $geometry="";
@@ -146,7 +169,7 @@ foreach (@nodes) {
if ($tilefact) {
my $corrected_x=$currx+$wmxo;
my $corrected_y=$curry+$wmyo;
$geometry="-geometry +$corrected_x+$corrected_y";
$geometry="-geometry $sizegeometry+$corrected_x+$corrected_y";
$currx+=$window_width;
if ($currx >= ($tilefact * $window_width)) {
$currx=0;
@@ -155,6 +178,8 @@ foreach (@nodes) {
$curry = $panel_pad; #+$top_pad;
}
}
} elsif ($sizegeometry) {
$geometry = "-geometry $sizegeometry";
}
system("xterm $xrm -bg black -fg white ".join(" ",@ARGV)." -title $_ -n $_ $geometry -e /bin/bash -c \"$mydir/xtcd.pl .".$ENV{DISPLAY}." $_ $_ & let SDATE=`date +%s`+5; $mydir/rcons $_ ".$conservers{$_}."; if [ \\\$SDATE -gt \\`date +%s\\` ]; then echo Press enter to close; read SDATE; fi\" &");
+33 -14
View File
@@ -443,22 +443,41 @@ sub parse_args_xdsh
}
# add config file with strict host checking no
my $cmd = "echo \"StrictHostKeyChecking no\" >> $home/.ssh/config";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{ # error
$msg = "Error from $cmd\n";
xCAT::MsgUtils->message("E", $msg);
# add config file with strict host checking no, if not already there
my $configinfo = "StrictHostKeyChecking no";
my $configfile= "$home/.ssh/config";
if (-e $configfile)
{
my $cmd = "grep StrictHostKeyChecking $configfile";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC != 0)
{ # not there
$cmd = "echo $configinfo >> $configfile";
my @output = xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{ # error
xCAT::MsgUtils->message("E", "Error on $cmd, @output");
return 1;
}
}
}
else # file does not exist
{
my $cmd = "echo $configinfo >> $configfile";
my @output = xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{ # error
xCAT::MsgUtils->message("E", "Error on $cmd, @output");
return 1;
}
else
{
chmod 0600, $configfile;
}
}
my $cmd = "chmod 0600 $home/.ssh/config";
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{ # error
$msg = "Error from $cmd\n";
xCAT::MsgUtils->message("E", $msg);
}
# if current_userid is not "root", we need to generate the keys
# here before becoming root while running under xcatd
+32
View File
@@ -88,4 +88,36 @@ opt/xcat/bin/xcatclient opt/xcat/bin/lshwconn
opt/xcat/bin/xcatclientnnr opt/xcat/sbin/makeroutes
opt/xcat/bin/xcatclientnnr opt/xcat/sbin/snmove
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lsxcatd
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskit
opt/xcat/bin/xcatclientnnr opt/xcat/bin/addkit
opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmkit
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/addkitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmkitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/chkkitcomp
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskitdeployparam
opt/xcat/bin/xcatclient opt/xcat/bin/postage
opt/xcat/bin/xcatclient opt/xcat/bin/cfghost
opt/xcat/bin/xcatclientnnr opt/xcat/bin/cfgve
opt/xcat/bin/xcatclientnnr opt/xcat/bin/chzone
opt/xcat/bin/xcatclientnnr opt/xcat/bin/configfpc
opt/xcat/bin/xcatclientnnr opt/xcat/bin/geninitrd
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lskmodules
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lsve
opt/xcat/bin/xcatclientnnr opt/xcat/bin/mkzone
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodeaddunmged
opt/xcat/bin/xcatclient opt/xcat/bin/nodechmac
opt/xcat/bin/xcatclient opt/xcat/bin/nodechprofile
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodediscoverdef
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodediscoverls
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodediscoverstart
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodediscoverstatus
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodediscoverstop
opt/xcat/bin/xcatclientnnr opt/xcat/bin/nodeimport
opt/xcat/bin/xcatclient opt/xcat/bin/nodepurge
opt/xcat/bin/xcatclient opt/xcat/bin/noderefresh
opt/xcat/bin/xcatclient opt/xcat/bin/noderegenips
opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmosdistro
opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmzone
opt/xcat/bin/xcatclientnnr opt/xcat/bin/slpdiscover
opt/xcat/bin/xcatclient opt/xcat/bin/xCATWorld
+14 -2
View File
@@ -6,13 +6,15 @@ B<configfpc> - discover the Fan Power Controllers (FPCs) and configure the FPC i
B<configfpc> B<-i> I<interface>
B<configfpc> B<-i> I<interface> B<--ip> I<default ip address>
B<configfpc> [B<-V>|B<--verbose>]
B<configfpc> [B<-h>|B<--help>|B<-?>]
=head1 DESCRIPTION
B<configfpc> will discover and configure all FPCs that are set to the default IP address.
B<configfpc> will discover and configure all FPCs that are set to the default IP address. If not supplied the default ip is 192.168.0.100.
The B<-i> B<interface> is required to direct B<configfpc> to the xCAT MN interface which is on the same VLAN as the FPCs.
@@ -24,7 +26,7 @@ The B<configfpc> command discovers the FPCs and collects the MAC address. The MA
This process is repeated until no more FPCs are discovered.
For more information on xCAT support of NeXtScale and configfpc see:
For more information on xCAT support of NeXtScale and configfpc see the following doc:
XCAT_NeXtScale_Clusters
=head1 OPTIONS
@@ -35,6 +37,10 @@ XCAT_NeXtScale_Clusters
Use this flag to specify which xCAT MN interface (example: eth4) that is connected to the NeXtScale FPCs. This option is required.
=item B<--ip> I<default ip address>
Use this flag to override the default ip address of 192.168.0.100 with a new address.
=item B<-V>|B<--verbose>
Verbose mode
@@ -51,5 +57,11 @@ To discover and configure all NeXtScale Fan Power Controllers (FPCs) connected o
B<configfpc> B<-i> I<eth0>
=item 2
To override the default ip address and run in Verbose mode.
B<configfpc> B<-i> I<eth0> B<--ip> I<196.68.0.100> B<-V>
=back
+6 -2
View File
@@ -6,9 +6,9 @@ B<genimage> - Generates a stateless image to be used for a diskless install.
B<genimage>
B<genimage> [B<-o> I<osver>] [B<-a> I<arch>] [B<-p> I<profile>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<--onlyinitrd>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>] [B<--dryrun>] [B<--ignorekernelchk>] I<imagename>
B<genimage> [B<-o> I<osver>] [B<-a> I<arch>] [B<-p> I<profile>] [B<-i> I<nodebootif>] [B<-n> I<nodenetdrivers>] [B<--onlyinitrd>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>] [B<--dryrun>] [B<--ignorekernelchk>] [B<--noupdate>] I<imagename>
B<genimage> B<-o> I<osver> [B<-a> I<arch>] B<-p> I<profile> B<-i> I<nodebootif> B<-n> I<nodenetdrivers> [B<--onlyinitrd>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>] [B<--dryrun>]
B<genimage> B<-o> I<osver> [B<-a> I<arch>] B<-p> I<profile> B<-i> I<nodebootif> B<-n> I<nodenetdrivers> [B<--onlyinitrd>] [B<-r> I<otherifaces>] [B<-k> I<kernelver>] [B<-g> I<krpmver>] [B<-m> I<statelite>] [B<-l> I<rootlimitsize>] [B<--permission> I<permission>] [B<--interactive>] [B<--dryrun>] [B<--noupdate>]
B<genimage> [B<-h> | B<--help> | B<-v> | B<--version>]
@@ -154,6 +154,10 @@ This flag shows the underlying call to the os specific genimage function. The us
Skip the kernel version checking when injecting drivers from osimage.driverupdatesrc. That means all drivers from osimage.driverupdatesrc will be injected to initrd for the specific target kernel.
=item B<--noupdate>
This flag allows the user to bypass automatic package updating when installing other packages.
=item B<-v|--version>
Display version.
+22 -14
View File
@@ -4,19 +4,23 @@ B<getxcatdocs> - downloads the xCAT documentation and converts to HTML and PDF
=head1 SYNOPSIS
B<getxcatdocs> [B<-?> | B<-h> | B<--help> | B<-v> | B<--version>] [I<destination-dir>]
B<getxcatdocs> [B<-?> | B<-h> | B<--help>]
B<getxcatdocs> [B<-v> | B<--verbose>] [I<destination-dir>]
B<getxcatdocs> [B<-v> | B<--verbose>] [B<-c> | B<--continue>] [B<-d> | B<--doc> I<single_doc>] [I<destination-dir>]
=head1 DESCRIPTION
The B<getxcatdocs> command downloads the xCAT documentation from the wiki and converts it to both HTML and PDF.
This enables reading the documentation when you do not have internet access. Note that this command does not
download/convert the entire xCAT wiki - only the "official" xCAT documentation linked from https://sourceforge.net/apps/mediawiki/xcat/index.php?title=XCAT_Documentation .
download/convert the entire xCAT wiki - only the "official" xCAT documentation linked from http://sourceforge.net/p/xcat/wiki/XCAT_Documentation.
If I<destination-dir> is specified, B<getxcatdocs> will put the converted documentation in that directory, in 2 sub-directories: html, pdf.
Otherwise, it will put it in the current directory (in the same two sub-directories).
If I<destination-dir> is specified, B<getxcatdocs> will put the converted documentation in that directory, in 3 sub-directories: html, pdf, images.
Otherwise, it will put it in the current directory (in the same three sub-directories).
B<getxcatdocs> uses wget to do the download the documents and xhtml2pdf to convert them to PDF. To install xhtml2pdf, see:
https://sourceforge.net/apps/mediawiki/xcat/index.php?title=Editing_xCAT_Documentation_Pages#Converting_Wiki_Pages_to_HTML_and_PDFs .
If B<--doc> I<single_doc> is specified, only that one wiki page will be downloaded and converted.
B<getxcatdocs> uses curl to run the Allura wiki API to download the document markdown text, and Pandoc with LaTex them to PDF. You must have all of these functions installed to run B<getxcatdocs>. See:
http://sourceforge.net/p/xcat/wiki/Editing_and_Downloading_xCAT_Documentation/#converting-wiki-pages-to-html-and-pdfs
=head2 Limitations:
@@ -26,24 +30,28 @@ https://sourceforge.net/apps/mediawiki/xcat/index.php?title=Editing_xCAT_Documen
This command does not run on AIX or Windows.
=item *
The conversion to HTML does not yet honor the xCAT wiki style sheet.
=back
=head1 OPTIONS
=over 10
=item B<-v|--version>
Command Version.
=item B<-?|-h|--help>
Display usage message.
=item B<-v|--verbose>
Run the command in verbose mode.
=item B<-c|--continue>
If a previous run of this command failed (which often happens if you lose your network connection), continue processing using files already downloaded to your markdown directory.
=item B<-d|--doc> I<single_doc>
Run this command for a single document only. If you get errors about Official-xcat-doc.png not found, either download this image directly from http://sourceforge.net/p/xcat/wiki/XCAT_Documentation/attachment/Official-xcat-doc.png or run B<getxcatdocs -d XCAT_Documentation> first.
=back
=head1 RETURN VALUE
+7
View File
@@ -58,6 +58,7 @@ is a comma-delimited list of kit names. The B<lskit> command will only display t
=item B<-x|--xml|--XML>
Need XCATXMLTRACE=1 env when using -x|--xml|--XML, for example: XCATXMLTRACE=1 lskit -x testkit-1.0.0
Return the output with XML tags. The data is returned as:
<data>
<kitinfo>
@@ -156,6 +157,12 @@ To list the framework value of a Kit tarfile.
kitframework=2
compatible_kitframeworks=0,1,2
=item 5.
To list kit "testkit-1.0-1" with XML tags, enter:
XCATXMLTRACE=1 lskit -x testkit-1.0-1
=back
+7
View File
@@ -47,6 +47,7 @@ is a comma-delimited list of kit component names. The B<lskitcomp> command will
=item B<-x|--xml|--XML>
Need XCATXMLTRACE=1 env when using -x|--xml|--XML.
Return the output with XML tags. The data is returned as:
<data>
<kitinfo>
@@ -140,6 +141,12 @@ To list kit components compatible with "rhels-6.2-x86_64" osdistro and "computen
lskitcomp -O rhels-6.2-x86_64 -S computenode
=item 6.
To list the kit component "testkit-compute-1.0-1-ubuntu-14.04-ppc64el" with XML tags, enter:
XCATXMLTRACE=1 lskitcomp -x testkit-compute-1.0-1-ubuntu-14.04-ppc64el
=back
+1 -1
View File
@@ -14,7 +14,7 @@ I<lsslp [noderange] [-V] [-i ip[,ip..]][-w][-r|-x|-z][-n][-s CEC|FRAME|MM|IVM|RS
=head1 DESCRIPTION
The lsslp command discovers selected service types using the -s flag. All service types are returned if the -s flag is not specified. If a specific IP address is not specified using the -i flag, the request is sent out all available network adapters. The optional -r, -x, -z and --vpdtable flags format the output. If you can't receive all the hardware, please use -T to increase the waiting time. B<NOTE> lsslp on AIX has restriction. According to AIX design, you need to use these steps to discover nodes for each vlan: 1.Add multicast route, for example: route add 239.255.255.253 40.0.0.96. 2. Use lsslp -i to do discovery, for example, lsslp -i 40.0.0.96. 3. Delete the route: route delete 239.255.255.253 40.0.0.96. If you have several vlans and need to do discovery through several network interfaces, you need to repeat the steps above.
The lsslp command discovers selected service types using the -s flag. All service types are returned if the -s flag is not specified. If a specific IP address is not specified using the -i flag, the request is sent out all available network adapters. The optional -r, -x, -z and --vpdtable flags format the output. If you can't receive all the hardware, please use -T to increase the waiting time.
NOTE: SLP broadcast requests will propagate only within the subnet of the network adapter broadcast IPs specified by the -i flag.
+7 -7
View File
@@ -68,13 +68,13 @@ To display all information:
Output is similar to:
Version 2.7 (svn r, built Tue Jan 17 15:16:33 EST 2012)
This is a Management Node
cfgloc=mysql:dbname=xcatdb;host=10.6.0.1|xcatadmin
dbengine=mysql
dbname=xcatdb
dbhost=10.6.0.1
dbadmin=xcatadmin
Version 2.8.5 (git commit 0d4888af5a7a96ed521cb0e32e2c918a9d13d7cc, built Tue Jul 29 02:22:47 EDT 2014)
This is a Management Node
cfgloc=mysql:dbname=xcatdb;host=9.114.34.44|xcatadmin
dbengine=mysql
dbname=xcatdb
dbhost=9.114.34.44
dbadmin=xcatadmin
=back
+24 -1
View File
@@ -128,13 +128,28 @@ To import nodes using a profile, follow the following steps:
__hostname__:
mac=b8:ac:6f:37:59:28
cec=mycec
__hostname__:
mac=b8:ac:6f:37:59:28
cec=mycec
lparid=2
# Node information file ends.
Example of a node information file that specifies a PowerKVM Guest node that uses KVM management:
# Node information file begins
# This entry defines a PowerKVM Guest node.
# Make sure the node 'vm01' is already created on Hypervisor
vm01:
mac=b8:ef:3f:28:31:15
vmhost=pkvm1
# Node information file ends.
The node information file includes the following items:
B<__hostname__:> This is a mandatory item.
Description: The name of the node, where __hostname__ is automatically generated by the node name format. You can also input a fixed node name, for example compute-node.
Description: The name of the node, where __hostname__ is automatically generated by the node name format. You can also input a fixed node name, for example "compute-node".
B<mac=<mac-address>> This is a mandatory item.
@@ -152,6 +167,10 @@ B<cec=<cec-name>> This is a mandatory option for defining Power rack-mounted no
Description: Specifies the name of a Power rack-mount central electronic complex (CEC).
B<lparid=<lpar-id>> This is a optional option for defining Power rack-mounted nodes.
Description: Specifies the LPAR ID of a Power rack-mounted node, where <lpar-id> is the ID number. The default value is 1 if it is not defined.
B<ip=<ip-address>> This is an optional item.
Description: Specify the IP address used for provisioning a node, where <ip-address> is in the form xxx.xxx.xxx.xxx. If this item is not included, the IP address used to provision the node is generated automatically according to the Network Profile used by the node.
@@ -176,6 +195,10 @@ B<unit=<rack-server-unit-location>> This is an optional item.
Description: node location info, for rack server only. Specify the node's start unit number in rack, in U. this item must be specified together with rack and height.
B<vmhost=<PowerKVM Hypervisior Host Name>> This is a mandatory option for defining PowerKVM Guest nodes.
Description: Specifies the vmhost of a Power KVM Guest node, where <vmhost> is the host name of PowerKVM Hypervisior.
3. Import the nodes, by using the following commands. Note: If we want to import PureFlex X/P nodes, hardware profile must be set to a PureFlex hardware type.
nodeimport file=/root/hostinfo.txt networkprofile=default_cn imageprofile=rhels6.3_packaged hostnameformat=compute-#NNN
+6 -2
View File
@@ -4,9 +4,9 @@ B<pasu> - run the ASU to many nodes in parallel
=head1 SYNOPSIS
B<pasu> [B<-V>] [B<-d>] [B<-n>] [B<-l> I<user>] [B<-p> I<passwd>] [B<-f> I<fanout>] I<noderange> I<command>
B<pasu> [B<-V>] [B<-d>] [B<-n>] [B<-l> I<user>] [B<-p> I<passwd>] [B<-f> I<fanout>] [B<-i> I<hostname-suffix>] I<noderange> I<command>
B<pasu> [B<-V>] [B<-d>] [B<-n>] [B<-l> I<user>] [B<-p> I<passwd>] [B<-f> I<fanout>] B<-b> I<batchfile> I<noderange>
B<pasu> [B<-V>] [B<-d>] [B<-n>] [B<-l> I<user>] [B<-p> I<passwd>] [B<-f> I<fanout>] [B<-i> I<hostname-suffix>] B<-b> I<batchfile> I<noderange>
B<pasu> [B<-h> | B<--help>]
@@ -60,6 +60,10 @@ By default, pasu filters out (i.e. does not display) the standard initial output
If you want this output to be displayed, use this flag.
=item B<-i|--interface> I<hostname-suffix>
The hostname suffix to be appended to the node names.
=item B<-V|--verbose>
Display verbose messages.
+110 -16
View File
@@ -27,17 +27,38 @@ B<Power 7 server specific :>
=over 2
B<renergy> I<noderange> [-V] { all | [savingstatus] [dsavingstatus]
[cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin]
[averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed]
[syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin]
[ffoTurbo] [ffoNorm] [ffovalue]}
B<renergy> I<noderange> [-V] { savingstatus={on | off}
| dsavingstatus={on-norm | on-maxp | off}
| fsavingstatus={on | off} | ffovalue=MHZ
| cappingstatus={on | off} | cappingwatt=watt
| cappingperc=percentage }
=back
B<Power 8 server specific :>
=over 2
B<renergy> I<noderange> [-V] { all | [savingstatus] [dsavingstatus]
[cappingstatus] [cappingmaxmin] [cappingvalue] [cappingsoftmin]
[averageAC] [averageDC] [ambienttemp] [exhausttemp] [CPUspeed]
[averageAC] [averageAChistory] [averageDC] [averageDChistory]
[ambienttemp] [ambienttemphistory] [exhausttemp] [exhausttemphistory]
[fanspeed] [fanspeedhistory] [CPUspeed] [CPUspeedhistory]
[syssbpower] [sysIPLtime] [fsavingstatus] [ffoMin] [ffoVmin]
[ffoTurbo] [ffoNorm] [ffovalue]}
B<renergy> I<noderange> [-V] { savingstatus={on | off}
| dsavingstatus={on-norm | on-maxp | off}
| fsavingstatus={on | off} | ffovalue=MHZ
| cappingstatus={on | off} | cappingwatt=watt
| cappingperc=percentage }
| fsavingstatus={on | off} | ffovalue=MHZ }
I<NOTE:> The setting operation for B<Power 8> server is only supported
for the server which is running in PowerVM mode. Do NOT run the setting
for the server which is running in OPAL mode.
=back
@@ -127,10 +148,11 @@ user can query and set the power saving and power capping status, and also can
query the average consumed energy, the ambient and exhaust temperature,
the processor frequency for a server.
B<renergy> command supports IBM POWER6 and POWER7 rack-mounted servers,
B<renergy> command supports IBM POWER6, POWER7 and POWER8 rack-mounted servers,
BladeCenter management modules, blade servers, and iDataPlex servers.
For system p rack-mounted servers, the following specific hardware types are supported:
For I<Power6> and I<Power7> rack-mounted servers, the following specific hardware types are supported:
I<8203-E4A>, I<8204-E8A>, I<9125-F2A>, I<8233-E8B>, I<8236-E8C>.
For I<Power8> server, there's no hardware type restriction.
The parameter I<noderange> needs to be specified for the B<renergy> command to
get the target servers. The I<noderange> should be a list of CEC node names, blade
@@ -234,11 +256,13 @@ will get response immediately.
=head1 B<PREREQUISITES>
For the system p nodes, the B<renergy> command depends
For the I<Power6> and I<Power7> nodes, the B<renergy> command depends
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)
NOTE: I<Power8> nodes don't need this specific energy management package.
For iDataPlex nodes, the B<renergy> command depends
on the Energy Management Plugin B<xCAT-xEnergy> to
communicate with server. This plugin must be requested from IBM.
@@ -262,12 +286,14 @@ Display the version information.
Verbose output.
=item B<all>
Query all energy attributes which supported by the specific
type of hardware.
For I<Power8> machines, will not display the attributes
for historical records.
=item B<pd1all>
Query all energy attributes of the power domain 1 for blade
@@ -282,6 +308,10 @@ management module node.
Query the current ambient temperature. (Unit is centigrade)
=item B<ambienttemphistory>
Query the historical records which were generated in last one hour for B<ambienttemp>.
=item B<availableDC>
Query the total DC power available for the entire blade center chassis.
@@ -298,10 +328,18 @@ averageAC is the total AC power being consumed by all modules
in the chassis. It also includes power consumed by the Chassis
Cooling Devices for BCH chassis.
=item B<averageAChistory>
Query the historical records which were generated in last one hour for B<averageAC>.
=item B<averageDC>
Query the average power consumed (Output). (Unit is watt)
=item B<averageDChistory>
Query the historical records which were generated in last one hour for B<averageDC>.
=item B<capability>
Query the Power Capabilities of the blade server.
@@ -380,6 +418,10 @@ guaranteed.
Query the effective processor frequency. (Unit is MHz)
=item B<CPUspeedhistory>
Query the historical records which were generated in last one hour for B<CPUspeed>
=item B<dsavingstatus>
Query the dynamic power saving status. The result should
@@ -410,6 +452,21 @@ B<savingstatus> is in turn off status.
Query the current exhaust temperature. (Unit is centigrade)
=item B<exhausttemphistory>
Query the historical records which were generated in last one hour for B<exhausttemp>
=item B<fanspeed>
Query the fan speed for all the fans which installed in this node. (Unit is RPM - Rotations Per Minute))
If there are multiple fans for a node, multiple lines will be output. And a fan name in bracket will be
appended after B<fanspped> attribute name.
=item B<fanspeedhistory>
Query the historical records which were generated in last one hour for B<fanspeed>.
=item B<ffoMin>
Query the minimum cpu frequency which can be set for FFO. (Fixed
@@ -455,7 +512,7 @@ The ffovalue setting operation needs about 1 minute to take effect.
Query the status of FFO. The result should be 'on' or 'off'.
'on' - enable; 'off' - disable.
=item B<fsavingstatus>={B<on> B<off>}
=item B<fsavingstatus>={B<on> | B<off>}
Set the status of FFO. The value must be 'on' or 'off'.
@@ -574,7 +631,7 @@ Query the time used from FSP standby to OS standby.
=item B<syssbpower>
Query the system power consumed prior to power on.
(Unit is MHz)
(Unit is Watt)
=item B<thermaloutput>
@@ -595,7 +652,7 @@ center chassis.
=item 1
Query all the attributes which CEC1,CEC2 supported.
Query all attributes which CEC1,CEC2 supported.
B<renergy> CEC1,CEC2 all
@@ -629,6 +686,43 @@ The output of the query operation:
=item 2
Query the B<fanspeed> attribute for Power8 CEC.
B<renergy> CEC1 fanspeed
The output of the query operation:
CEC1: fanspeed (Fan U78CB.001.WZS00MA-A1 00002101): 5947 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-A2 00002103): 6081 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-A3 00002105): 6108 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-A4 00002107): 6000 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-A5 00002109): 6013 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-A6 0000210B): 6013 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-E1 0000210C): 4992 RPM
CEC1: fanspeed (Fan U78CB.001.WZS00MA-E2 0000210D): 5016 RPM
=item 3
Query the historical records for the B<CPUspeed> attribute. (Power8 CEC)
B<renergy> CEC1 CPUspeedhistory
The output of the query operation:
CEC1: CPUspeedhistory: 2027 MHZ: 20141226042900
CEC1: CPUspeedhistory: 2027 MHZ: 20141226042930
CEC1: CPUspeedhistory: 2244 MHZ: 20141226043000
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043030
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043100
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043130
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043200
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043230
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043300
CEC1: CPUspeedhistory: 2393 MHZ: 20141226043330
...
=item 4
Query all the attirbutes for management module node MM1. (For chassis)
B<renergy> MM1 all
@@ -658,7 +752,7 @@ The output of the query operation:
in this power domain.
mm1: thermaloutput: 9717.376000 BTU/hour
=item 3
=item 5
Query all the attirbutes for blade server node blade1.
@@ -674,7 +768,7 @@ The output of the query operation:
blade1: maxCPUspeed: 4204MHZ
blade1: savingstatus: off
=item 4
=item 6
Query the attributes savingstatus, cappingstatus
and CPUspeed for server CEC1.
@@ -687,7 +781,7 @@ The output of the query operation:
CEC1: cappingstatus: on
CEC1: CPUspeed: 3621 MHz
=item 5
=item 7
Turn on the power saving function of CEC1.
@@ -698,7 +792,7 @@ The output of the setting operation:
CEC1: Set savingstatus succeeded.
CEC1: This setting may need some minutes to take effect.
=item 6
=item 8
Set the power capping value base on the percentage of the
max-min capping value. Here, set it to 50%.
+26 -3
View File
@@ -1,6 +1,6 @@
=head1 NAME
B<restartxcatd> - Restart the xCAT daemon (xcatd) on AIX.
B<restartxcatd> - Restart the xCAT daemon (xcatd).
=head1 SYNOPSIS
@@ -9,9 +9,32 @@ B<restartxcatd> [[B<-h>|B<--help>] | [B<-v>|B<--version>] | [B<-r>|B<--reload>]]
=head1 DESCRIPTION
The B<restartxcatd> command restarts the xCAT daemon (xcatd) on AIX.
It uses the startsrc and stopsrc commands to do the restart work. If the xcatd subsystem was not created, B<restartxcatd> will create it automatically.
The B<restartxcatd> command restarts the xCAT daemon (xcatd).
B<Linux Specific>
=over 2
It will perform the xcatd I<fast restart>. The xcatd I<fast restart> is a specific restart which has two advantages compares to the I<stop> and then I<start>.
1. The interval of xcatd out of service is very short.
2. The in processing request which initiated by old xcatd will not be stopped by force. The old xcatd will hand over the sockets to new xcatd, but old xcat will still be waiting for the in processing request to finish before the exit.
It does the same thing as 'service xcatd restart' on NON-systemd enabled Operating System like rh6.x and sles11.x. But for the systemd enabled Operating System like rh7 and sles12, the 'service xcatd restart' just do the I<stop> and I<start> instead of xcatd I<fast restart>.
It's recommended to use B<restartxcatd> command to restart xcatd on systemd enable system like rh7 and sles12 instead of 'service xcatd restart' or 'systemctl restart xcatd'.
=back
B<AIX Specific>
=over 2
It runs 'stopsrc -s xcatd' to stop xcatd first if xcatd is active, then runs 'startsrc -s xcatd' to start xcatd.
If the xcatd subsystem was not created, B<restartxcatd> will create it automatically.
=back
=head1 OPTIONS
+2 -2
View File
@@ -96,7 +96,7 @@ Retrieves deconfigured resources. Deconfigured resources are hw components (cpus
=item B<-x>
To output the information of deconfigured resources in XML format.
To output the raw information of deconfigured resources for CEC.
=item B<asset>
@@ -223,7 +223,7 @@ To retrieve all information available from blade node4, enter:
=item *
To output the information of deconfigured resources in XML format for CEC cec01, enter:
To output the raw information of deconfigured resources for CEC cec01, enter:
rinv cec01 deconfig -x
+1 -1
View File
@@ -48,7 +48,7 @@ osimage name that include this kit component.
=item B<kitcompname_list>
A comma-delimited list of valid full kit component names or kit component basenames that are to be removed from the osimage.
A comma-delimited list of valid full kit component names or kit component basenames that are to be removed from the osimage. If a basename is specified, all kitcomponents matching that basename will be removed from the osimage.
=back
-2
View File
@@ -86,8 +86,6 @@ Reboot the service processor. If there are primary and secondary FSPs/BPAs of on
Attempt to request clean shutdown of OS (may not detect failures in completing command)
For stateless osimage, the 'acpid' package needs to be added to the .pkglist configuration file for the stateless osimage to enable the 'softoff' function.
=item B<off>
Turn power off.
+4 -3
View File
@@ -89,7 +89,7 @@ Files may be distributed and synchronized for both diskless and
diskfull nodes. Syncing files to NFS-based statelite nodes is not supported.
More information on using the synchronization file function is in
Using_Updatenode.
the following doc: Using_Updatenode.
=head3 Create the synclist file
@@ -345,7 +345,8 @@ Display usage message.
=item B<-k|--security>
Update the ssh keys and host keys for the service nodes and compute nodes;
Update the ca and credentials to the service nodes. Never run this command to the Management Node, it will take down xcatd.
Update the ca and credentials to the service nodes. Never run this command to the Management Node, it will take down xcatd.
You must be running updatenode as root to use the -k flag.
=item B<-l>|B<--user> I<user_ID>
@@ -365,7 +366,7 @@ be run during install. You should use updatenode <noderange> -F instead.
=item B<-S|--sw>
Specifies that node software should be updated. In Sysclone environment, specifies pushing the delta changes to target nodes.
Specifies that node software should be updated. In Sysclone environment, specifies pushing the delta changes to target nodes.
=item B<-s|--sn>
+10
View File
@@ -91,6 +91,16 @@ Output will be similar to:
For the attributes that are not recognized, the value will be blank.
=item *
To copy the packages from a supplemental DVD ISO file:
copycds -n /isodir/RHEL6.5/RHEL6.5-Supplementary-20131114.2-Server-ppc64-DVD1.iso -n rhels6.5-supp
Also, remember to add the new directory to your osimage definition:
chdef -t osimage myosimage -p pkgdir=/install/rhels6.5-supp/ppc64
=back
=head1 SEE ALSO
+6 -2
View File
@@ -6,9 +6,9 @@ B<makedns> - sets up domain name services (DNS).
B<makedns> [I<-h>|I<--help>]
B<makedns> [-e|--external] [I<-n>|I<--new>] [I<noderange>]
B<makedns> [-V|--verbose] [-e|--external] [I<-n>|I<--new>] [I<noderange>]
B<makedns> [-e|--external] [I<-d>|I<--delete> I<noderange>]
B<makedns> [-V|--verbose] [-e|--external] [I<-d>|I<--delete> I<noderange>]
=head1 DESCRIPTION
@@ -37,6 +37,10 @@ Cluster_Name_Resolution
=over 6
=item B<-V>|B<--verbose>
Verbose mode.
=item B<-n>|B<--new>
Use this flag to create new named configuration and db files.
+18
View File
@@ -13,6 +13,8 @@ Prefix: /opt/xcat
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
%define pcm %(if [ "$pcm" = "1" ];then echo 1; else echo 0; fi)
%define notpcm %(if [ "$pcm" = "1" ];then echo 0; else echo 1; fi)
# AIX will build with an arch of "ppc"
%ifos linux
@@ -115,6 +117,14 @@ cp share/xcat/tools/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
#cp usr/share/xcat/scripts/setup-local-client.sh $RPM_BUILD_ROOT/usr/share/xcat/scripts/setup-local-client.sh
#chmod 755 $RPM_BUILD_ROOT/usr/share/xcat/scripts/setup-local-client.sh
# PCM does not need getxcatdocs
# getxcatdocs causes xCAT-client requires perl-JSON, which is not shipped with PCM
%if %pcm
rm -f $RPM_BUILD_ROOT/%{prefix}/bin/getxcatdocs
rm -f $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/getxcatdocs.1.html
rm -f $RPM_BUILD_ROOT/%{prefix}/share/man/man1/getxcatdocs.1
%endif
# These links get made in the RPM_BUILD_ROOT/prefix area
ln -sf xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rpower
ln -sf xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rscan
@@ -284,6 +294,14 @@ export XCATROOT PATH MANPATH
export PERL_BADLANG=0
EOF
# export XCATSSLVER for sles11. Others OS can work without this setting.
if [ -r /etc/SuSE-release ]; then
ver=`grep 'VERSION' /etc/SuSE-release | awk -F= '{print $2}' | sed 's/ //g'`
if [ "$ver" = "11" ]; then
echo 'export XCATSSLVER=TLSv1' >> /etc/profile.d/xcat.sh
fi
fi
cat << EOF > /etc/profile.d/xcat.csh
setenv XCATROOT "$RPM_INSTALL_PREFIX0"
setenv PATH \${XCATROOT}/bin:\${XCATROOT}/sbin:\${XCATROOT}/share/xcat/tools:\${PATH}
+326
View File
@@ -0,0 +1,326 @@
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<title>Eclipse Public License - Version 1.0</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Revision>2</o:Revision>
<o:TotalTime>3</o:TotalTime>
<o:Created>2004-03-05T23:03:00Z</o:Created>
<o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
<o:Pages>4</o:Pages>
<o:Words>1626</o:Words>
<o:Characters>9270</o:Characters>
<o:Lines>77</o:Lines>
<o:Paragraphs>18</o:Paragraphs>
<o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
<o:Version>9.4402</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:TrackRevisions/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:553679495 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p
{margin-right:0in;
mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.BalloonText, li.BalloonText, div.BalloonText
{mso-style-name:"Balloon Text";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:8.0pt;
font-family:Tahoma;
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US style='tab-interval:.5in'>
<div class=Section1>
<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
</p>
<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
OF THIS AGREEMENT.</span> </p>
<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
in the case of the initial Contributor, the initial code and documentation
distributed under this Agreement, and<br clear=left>
b) in the case of each subsequent Contributor:</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
changes to the Program, and</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
additions to the Program;</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
such changes and/or additions to the Program originate from and are distributed
by that particular Contributor. A Contribution 'originates' from a Contributor
if it was added to the Program by such Contributor itself or anyone acting on
such Contributor's behalf. Contributions do not include additions to the
Program which: (i) are separate modules of software distributed in conjunction
with the Program under their own license agreement, and (ii) are not derivative
works of the Program. </span></p>
<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
entity that distributes the Program.</span> </p>
<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
claims licensable by a Contributor which are necessarily infringed by the use
or sale of its Contribution alone or when combined with the Program. </span></p>
<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
distributed in accordance with this Agreement.</span> </p>
<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
receives the Program under this Agreement, including all Contributors.</span> </p>
<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
Subject to the terms of this Agreement, each Contributor hereby grants Recipient
a non-exclusive, worldwide, royalty-free copyright license to<span
style='color:red'> </span>reproduce, prepare derivative works of, publicly
display, publicly perform, distribute and sublicense the Contribution of such
Contributor, if any, and such derivative works, in source code and object code
form.</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
patent license under Licensed Patents to make, use, sell, offer to sell, import
and otherwise transfer the Contribution of such Contributor, if any, in source
code and object code form. This patent license shall apply to the combination
of the Contribution and the Program if, at the time the Contribution is added
by the Contributor, such addition of the Contribution causes such combination
to be covered by the Licensed Patents. The patent license shall not apply to
any other combinations which include the Contribution. No hardware per se is
licensed hereunder. </span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
Recipient understands that although each Contributor grants the licenses to its
Contributions set forth herein, no assurances are provided by any Contributor
that the Program does not infringe the patent or other intellectual property
rights of any other entity. Each Contributor disclaims any liability to Recipient
for claims brought by any other entity based on infringement of intellectual
property rights or otherwise. As a condition to exercising the rights and
licenses granted hereunder, each Recipient hereby assumes sole responsibility
to secure any other intellectual property rights needed, if any. For example,
if a third party patent license is required to allow Recipient to distribute
the Program, it is Recipient's responsibility to acquire that license before
distributing the Program.</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
Each Contributor represents that to its knowledge it has sufficient copyright
rights in its Contribution, if any, to grant the copyright license set forth in
this Agreement. </span></p>
<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
Program in object code form under its own license agreement, provided that:</span>
</p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
it complies with the terms and conditions of this Agreement; and</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
its license agreement:</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
effectively disclaims on behalf of all Contributors all warranties and
conditions, express and implied, including warranties or conditions of title
and non-infringement, and implied warranties or conditions of merchantability
and fitness for a particular purpose; </span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
effectively excludes on behalf of all Contributors all liability for damages,
including direct, indirect, special, incidental and consequential damages, such
as lost profits; </span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
states that any provisions which differ from this Agreement are offered by that
Contributor alone and not by any other party; and</span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
states that source code for the Program is available from such Contributor, and
informs licensees how to obtain it in a reasonable manner on or through a
medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
<p><span style='font-size:10.0pt'>When the Program is made available in source
code form:</span> </p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
it must be made available under this Agreement; and </span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
copy of this Agreement must be included with each copy of the Program. </span></p>
<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
copyright notices contained within the Program. </span></p>
<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
originator of its Contribution, if any, in a manner that reasonably allows
subsequent Recipients to identify the originator of the Contribution. </span></p>
<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
<p><span style='font-size:10.0pt'>Commercial distributors of software may
accept certain responsibilities with respect to end users, business partners
and the like. While this license is intended to facilitate the commercial use
of the Program, the Contributor who includes the Program in a commercial
product offering should do so in a manner which does not create potential
liability for other Contributors. Therefore, if a Contributor includes the
Program in a commercial product offering, such Contributor (&quot;Commercial
Contributor&quot;) hereby agrees to defend and indemnify every other
Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
legal actions brought by a third party against the Indemnified Contributor to
the extent caused by the acts or omissions of such Commercial Contributor in
connection with its distribution of the Program in a commercial product
offering. The obligations in this section do not apply to any claims or Losses
relating to any actual or alleged intellectual property infringement. In order
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
Contributor in writing of such claim, and b) allow the Commercial Contributor
to control, and cooperate with the Commercial Contributor in, the defense and
any related settlement negotiations. The Indemnified Contributor may participate
in any such claim at its own expense.</span> </p>
<p><span style='font-size:10.0pt'>For example, a Contributor might include the
Program in a commercial product offering, Product X. That Contributor is then a
Commercial Contributor. If that Commercial Contributor then makes performance
claims, or offers warranties related to Product X, those performance claims and
warranties are such Commercial Contributor's responsibility alone. Under this
section, the Commercial Contributor would have to defend claims against the
other Contributors related to those performance claims and warranties, and if a
court requires any other Contributor to pay any damages as a result, the
Commercial Contributor must pay those damages.</span> </p>
<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
responsible for determining the appropriateness of using and distributing the
Program and assumes all risks associated with its exercise of rights under this
Agreement , including but not limited to the risks and costs of program errors,
compliance with applicable laws, damage to or loss of data, programs or
equipment, and unavailability or interruption of operations. </span></p>
<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
or unenforceable under applicable law, it shall not affect the validity or
enforceability of the remainder of the terms of this Agreement, and without
further action by the parties hereto, such provision shall be reformed to the
minimum extent necessary to make such provision valid and enforceable.</span> </p>
<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
against any entity (including a cross-claim or counterclaim in a lawsuit)
alleging that the Program itself (excluding combinations of the Program with
other software or hardware) infringes such Recipient's patent(s), then such
Recipient's rights granted under Section 2(b) shall terminate as of the date
such litigation is filed. </span></p>
<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
shall terminate if it fails to comply with any of the material terms or
conditions of this Agreement and does not cure such failure in a reasonable
period of time after becoming aware of such noncompliance. If all Recipient's
rights under this Agreement terminate, Recipient agrees to cease use and
distribution of the Program as soon as reasonably practicable. However,
Recipient's obligations under this Agreement and any licenses granted by
Recipient relating to the Program shall continue and survive. </span></p>
<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
copies of this Agreement, but in order to avoid inconsistency the Agreement is
copyrighted and may only be modified in the following manner. The Agreement
Steward reserves the right to publish new versions (including revisions) of
this Agreement from time to time. No one other than the Agreement Steward has
the right to modify this Agreement. The Eclipse Foundation is the initial
Agreement Steward. The Eclipse Foundation may assign the responsibility to
serve as the Agreement Steward to a suitable separate entity. Each new version
of the Agreement will be given a distinguishing version number. The Program
(including Contributions) may always be distributed subject to the version of
the Agreement under which it was received. In addition, after a new version of
the Agreement is published, Contributor may elect to distribute the Program
(including its Contributions) under the new version. Except as expressly stated
in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
the intellectual property of any Contributor under this Agreement, whether
expressly, by implication, estoppel or otherwise. All rights in the Program not
expressly granted under this Agreement are reserved.</span> </p>
<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
State of New York and the intellectual property laws of the United States of
America. No party to this Agreement will bring a legal action under this
Agreement more than one year after the cause of action arose. Each party waives
its rights to a jury trial in any resulting litigation.</span> </p>
<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
</div>
</body>
</html>
@@ -0,0 +1,2 @@
#!/bin/bash
exec /opt/xcat/share/xcat/cons/hmc $CONFLUENT_NODE
@@ -0,0 +1,2 @@
#!/bin/bash
exec /opt/xcat/share/xcat/cons/kvm $CONFLUENT_NODE
+58
View File
@@ -0,0 +1,58 @@
Summary: xCAT integration with confluent systems management server
Name: xCAT-confluent
Version: %(cat Version)
Release: snap%(date +"%Y%m%d%H%M")
Epoch: 4
License: EPL
Group: Applications/System
Source: xCAT-confluent-%(cat Version).tar.gz
Packager: IBM Corp.
Vendor: IBM Corp.
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Prefix: /opt/xcat
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
%ifos linux
BuildArch: noarch
%endif
Requires: confluent_server
Provides: xCAT-confluent = %{epoch}:%{version}
%description
xCAT confluent provides the necessary integration pieces to utilize the confluent
system management server
%prep
%setup -q -n xCAT-confluent
%build
# Convert pods to man pages and html pages
#./xpod2man
%install
rm -rf $RPM_BUILD_ROOT
# Uncomment the following line if we ship bin files
# mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin
# cp -d bin/* $RPM_BUILD_ROOT/%{prefix}/bin/
# chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/*
mkdir -p $RPM_BUILD_ROOT/opt/confluent
cp -dr confluent/* $RPM_BUILD_ROOT/opt/confluent/
#cp share/man/man1/* $RPM_BUILD_ROOT/%{prefix}/share/man/man1
#chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
#cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
#chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/*
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
# Uncomment the following line if we ship bin files
# %{prefix}
/opt/confluent
%post
+214
View File
@@ -0,0 +1,214 @@
#!/usr/bin/perl
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
# First builds the xCAT summary man page from Synopsis of each man page.
# Then converts all of the pod man pages into html (including links to each other)
# We assume that this script is run in the xCAT-vlan-2.0 dir, so everything is
# done relative to that.
use strict;
#use lib '.';
use Pod::Man;
use Pod::Html;
my $poddir = 'pods';
my $mandir = 'share/man';
my $htmldir = 'share/doc';
my $cachedir = '/tmp';
my @pods = getPodList($poddir);
#foreach (@pods) { print "$_\n"; } exit;
# Build the cmd overview page.
#writesummarypage("$poddir/man1/xcat.1.pod", @pods);
# Build the man page for each pod.
#mkdir($mandir) or die "Error: could not create $mandir.\n";
print "Converting PODs to man pages...\n";
foreach my $podfile (@pods) {
my $manfile = $podfile;
$manfile =~ s/^$poddir/$mandir/; # change the beginning of the path
$manfile =~ s/\.pod$//; # change the ending
my $mdir = $manfile;
$mdir =~ s|/[^/]*$||; # get rid of the basename part
if (system("mkdir -p $mdir")) { die "Error: could not create $mdir.\n"; }
my ($section) = $podfile =~ /\.(\d+)\.pod$/;
convertpod2man($podfile, $manfile, $section);
}
my @dummyPods = createDummyPods($poddir, \@pods);
# Build the html page for each pod.
#mkdir($htmldir) or die "Error: could not create $htmldir.\n";
print "Converting PODs to HTML pages...\n";
# have to clear the cache, because old entries can cause a problem
unlink("$cachedir/pod2htmd.tmp", "$cachedir/pod2htmi.tmp");
foreach my $podfile (@pods) {
my $htmlfile = $podfile;
$htmlfile =~ s/^$poddir/$htmldir/; # change the beginning of the path
$htmlfile =~ s/\.pod$/\.html/; # change the ending
my $hdir = $htmlfile;
$hdir =~ s|/[^/]*$||; # get rid of the basename part
if (system("mkdir -p $hdir")) { die "Error: could not create $hdir.\n"; }
#print "$podfile, $htmlfile, $poddir, $htmldir\n";
convertpod2html($podfile, $htmlfile, $poddir, $htmldir);
}
# Remove the dummy pods
unlink @dummyPods;
rmdir "$poddir/man7";
exit;
# To enable linking between the cmd man pages and the db man pages, need to:
# grep thru the cmd pods searching for references (L<>) to any section 5 man page
# if that pod does not exist, create an empty one that will satisfy pod2html
# keep track of all dummy pods created, so they can be removed later
sub createDummyPods {
my ($poddir, $pods) = @_;
my $cmd = "grep -r -E 'L<.+\\([57]\\)\\|.+\\.[57]>' " . $poddir;
#print "Running cmd: ", $cmd, "\n";
my @lines = `$cmd`;
if ($?) { print "Error running: $cmd\n"; print join('', @lines); }
#my @lines;
#system($cmd);
my @dummyPods;
foreach my $l (@lines) {
#print "$l\n";
my @matches = $l =~ /L<([^\(]+)\(([57])\)\|\1\.[57]>/g; # get all the matches in the line
# The above line should create the array with every other entry being the man page name
# and every other entry is the section # (5 or 7)
my $cmd;
while ($cmd=shift @matches) {
#foreach my $m (@matches) {
my $section = shift @matches;
my $filename = "$poddir/man$section/$cmd.$section.pod";
#print "$filename\n";
if (!(grep /^$filename$/, @$pods) && !(grep /^$filename$/, @dummyPods)) { push @dummyPods, $filename; }
}
}
# Create these empty files
print "Creating empty linked-to files: ", join(', ', @dummyPods), "\n";
mkdir "$poddir/man7";
foreach my $d (@dummyPods) {
if (!open(TMP, ">>$d")) { warn "Could not create dummy pod file $d ($!)\n"; }
else { close TMP; }
}
return @dummyPods;
}
# Recursively get the list of pod man page files.
sub getPodList {
my $poddir = shift;
my @files;
# 1st get toplevel dir listing
opendir(DIR, $poddir) or die "Error: could not read $poddir.\n";
my @topdir = grep !/^\./, readdir(DIR); # /
close(DIR);
# Now go thru each subdir (these are man1, man3, etc.)
foreach my $mandir (@topdir) {
opendir(DIR, "$poddir/$mandir") or die "Error: could not read $poddir/$mandir.\n";
my @dir = grep !/^\./, readdir(DIR); # /
close(DIR);
foreach my $file (@dir) {
push @files, "$poddir/$mandir/$file";
}
}
return sort @files;
}
# Create the xcat man page that gives a summary description of each xcat cmd.
# Not used.
sub writesummarypage {
my $file = shift; # relative path file name of the man page
# the rest of @_ contains the pod files that describe each cmd
open(FILE, ">$file") or die "Error: could not open $file for writing.\n";
print FILE <<'EOS1';
=head1 NAME
B<xcat> - extreme Cluster Administration Tool.
=head1 DESCRIPTION
Extreme Cluster Administration Toolkit (xCAT). xCAT is a scalable distributed computing management
and provisioning tool that provides a unified interface for hardware control, discovery, and
OS diskful/diskfree deployment.
=head1 XCAT DATABASE
All of the cluster configuration information is in the xCAT database. See L<xcatdb(5)|xcatdb.5> for
descriptions of every table in the database.
=head1 XCAT COMMANDS
What follows is a short description of each xCAT command. To get more information about a particular
command, see its man page. Note that the commands are listed in alphabetical order B<within each section>,
i.e. all the commands in section 1, then the commands in section 3, etc.
=over 12
EOS1
# extract the summary for each cmd from its man page
foreach my $manpage (@_) {
my ($sectionnum) = $manpage =~ /\.(\d+)\.pod$/;
# Suck in the whole file, then we will parse it.
open(MANPAGE, "$manpage") or die "Error: could not open $manpage for reading.\n";
my @contents = <MANPAGE>;
my $wholemanpage = join('', @contents);
close(MANPAGE);
# This regex matches: optional space, =head1, space, title, space, cmd, space, description, newline
my ($cmd, $description) = $wholemanpage =~ /^\s*=head1\s+\S+\s+(\S+)\s+(.+?)\n/si;
if (!defined($cmd)) { print "Warning: $manpage is not in a recognized structure. It will be ignored.\n"; next; }
if (!defined($description)) { print "Warning: $manpage does not have a description for $cmd. It will be ignored.\n"; next; }
$cmd =~ s/^.<(.+)>$/$1/; # if the cmd name has pod formatting around it, strip it off
$description =~ s/^-\s*//; # if the description has a leading hypen, strip it off
print FILE "\n=item L<$cmd($sectionnum)|$cmd.$sectionnum>\n\n".$description."\n";
}
# Artificially add the xcattest cmd, because the xCAT-test rpm will add this
print FILE "\n=item L<xcattest(1)|xcattest.1>\n\nRun automated xCAT test cases.\n";
print FILE <<"EOS3";
=back
EOS3
close FILE;
}
# Create the html page for one pod.
sub convertpod2html {
my ($podfile, $htmlfile, $poddir, $htmldir) = @_;
#TODO: use --css=<stylesheet> and --title=<pagetitle> to make the pages look better
pod2html($podfile,
"--outfile=$htmlfile",
"--podpath=man1",
"--podroot=$poddir",
"--htmldir=$htmldir",
"--recurse",
"--cachedir=$cachedir",
);
}
# Create the man page for one pod.
sub convertpod2man {
my ($podfile, $manfile, $section) = @_;
my $parser = Pod::Man->new(section => $section);
$parser->parse_from_file($podfile, $manfile);
}
+35 -2
View File
@@ -10,7 +10,15 @@ DIR=`dirname $0`
DIR=`readlink -f $DIR`
# get the input files for dracut in the right place
DRACUTMODDIR=/usr/share/dracut/modules.d/97xcat
# Fedora 20 ppc64 uses /usr/lib/dracut/modules.d
# CentOS 7 probably uses /usr/lib/dracut/modules.d also
if [ -e "/usr/share/dracut/modules.d" ]
then
DRACUTMODDIR=/usr/share/dracut/modules.d/97xcat
else
DRACUTMODDIR=/usr/lib/dracut/modules.d/97xcat
fi
mkdir -p $DRACUTMODDIR
cp $DIR/* $DRACUTMODDIR
# For ppc64 platform, needs to remove some files,
@@ -22,6 +30,20 @@ if [ `uname -m` = "ppc64" ]; then
sed -i 's/\/usr\/lib\/libstdc++.so.6.0.13/\/usr\/lib64\/libstdc++.so.6.0.13/' $DRACUTMODDIR/install
sed -i 's/\/lib\/libgcc_s.so.1/\/lib64\/libgcc_s.so.1/' $DRACUTMODDIR/install
sed -i 's/\/lib\/libtinfo.so.5.7/\/lib64\/libtinfo.so.5.7/' $DRACUTMODDIR/install
# following changes are required on Fedora 20 ppc64
sed -i 's/\/lib64\/libnss_dns-2.12.so/\/lib64\/libnss_dns-2.18.so/' $DRACUTMODDIR/install
sed -i 's/\/lib\/libc.so.6/\/lib64\/libc.so.6/' $DRACUTMODDIR/install
sed -i 's/\/lib\/ld-linux.so.2/\/lib64\/ld-2.18.so/' $DRACUTMODDIR/install
sed -i 's/\/lib\/libdl.so.2/\/lib64\/libdl.so.2/' $DRACUTMODDIR/install
sed -i 's/\/lib\/libm.so.6/\/lib64\/libm.so.6/' $DRACUTMODDIR/install
sed -i 's/\/lib\/libpthread.so.0/\/lib64\/libpthread.so.0/' $DRACUTMODDIR/install
sed -i 's/\/lib64\/libncurses.so.5.7/\/lib64\/libncurses.so.5.9/' $DRACUTMODDIR/install
sed -i 's/\/usr\/lib64\/libstdc++.so.6.0.13/\/usr\/lib64\/libstdc++.so.6.0.19/' $DRACUTMODDIR/install
sed -i 's/\/lib64\/libtinfo.so.5.7/\/lib64\/libtinfo.so.5.9/' $DRACUTMODDIR/install
sed -i 's/\/usr\/lib64\/libsasl2.so.2/\/usr\/lib64\/libsasl2.so.3/' $DRACUTMODDIR/install
sed -i 's/\/lib64\/libnss_dns-2.12.so/\/lib64\/libnss_dns-2.18.so/' $DRACUTMODDIR/install
sed -i 's/\/lib\/terminfo\/l\/linux/\/usr\/share\/terminfo\/l\/linux/g' $DRACUTMODDIR/install
sed -i 's/\/lib\/terminfo\/v\/vt100/\/usr\/share\/terminfo\/v\/vt100/g' $DRACUTMODDIR/install
fi
if [ "$HOSTOS" = "mcp" ]; then
@@ -29,6 +51,8 @@ if [ "$HOSTOS" = "mcp" ]; then
sed -i 's/\/etc\/redhat-release/\/etc\/base-release \/etc\/system-release/' $DRACUTMODDIR/install
sed -i 's/btrfs//' $DRACUTMODDIR/installkernel
sed -i 's/\/usr\/bin\/basename/\/bin\/basename/' $DRACUTMODDIR/install
# these are needed for sysclone, but are not yet in mcp
sed -i 's/ bc//' $DRACUTMODDIR/install
sed -i 's/ mkdosfs//' $DRACUTMODDIR/install
@@ -36,6 +60,10 @@ if [ "$HOSTOS" = "mcp" ]; then
sed -i 's/ kexec//' $DRACUTMODDIR/install
sed -i 's/ klogd//' $DRACUTMODDIR/install
sed -i 's/ mdadm//' $DRACUTMODDIR/install
sed -i 's/ mkfs\.xfs//' $DRACUTMODDIR/install
sed -i 's/ xfs_db//' $DRACUTMODDIR/install
sed -i 's/ mkreiserfs//' $DRACUTMODDIR/install
sed -i 's/ reiserfstune//' $DRACUTMODDIR/install
# These timezone files are not available in the latest mcp build
sed -i 's/dracut_install \/usr\/share\/zoneinfo\/posix\/Asia\/Riyadh87//' $DRACUTMODDIR/install
@@ -55,8 +83,13 @@ if [ "$HOSTOS" = "mcp" ]; then
else
echo Creating the initramfs in /tmp/xcatgenesis.$$.rfs using dracut ...
fi
dracut -m "xcat base" -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION
# On Fedora 20 ppc64, dracut uses host-only mode by default
if [ `uname -m` = "ppc64" ]; then
dracut -m "xcat base" -N -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION
else
dracut -m "xcat base" -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION
fi
echo Expanding the initramfs into /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/`uname -m`/fs ...
cd /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/`uname -m`/fs
zcat /tmp/xcatgenesis.$$.rfs|cpio -dumi
+9 -4
View File
@@ -1,17 +1,17 @@
#!/bin/sh
echo $drivers
dracut_install wget openssl tar mstflint ipmitool cpio gzip lsmod ethtool modprobe touch echo cut wc
dracut_install wget openssl tar mstflint ipmitool cpio gzip lsmod ethtool modprobe touch echo cut wc bash
dracut_install netstat # broadcom update requires
dracut_install uniq # mellanox update requires
dracut_install grep ip hostname /usr/bin/awk egrep grep dirname expr
dracut_install mount.nfs sshd vi reboot lspci parted screen mkfs mkfs.ext4 #mkfs.btrfs removed
dracut_install mount.nfs sshd vi reboot lspci parted screen mkfs mkfs.ext4 mkfs.xfs xfs_db #mkfs.btrfs removed
dracut_install efibootmgr
#dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm
dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient lldpad
dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2
dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/head /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail /usr/bin/basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
dracut_install dmidecode /usr/lib64/libstdc++.so.6 #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
dracut_install dmidecode /usr/lib64/libstdc++.so.5 #broadcom firmware update links against old lib
dracut_install /lib/libpthread.so.0 #32 bit lib because UXSPI will not ship a native 64 bit build
@@ -617,4 +617,9 @@ dracut_install /lib64/rsyslog/lmnet.so
dracut_install /lib64/rsyslog/lmstrmsrv.so
dracut_install /lib64/rsyslog/imuxsock.so
dracut_install /usr/lib64/libnfsidmap/nsswitch.so
dracut_install killall logger nc nslookup bc chown chroot dd expr kill mkdosfs parted rsync shutdown sort ssh-keygen tr blockdev findfs insmod kexec lvm mdadm mke2fs pivot_root sshd swapon tune2fs mkreiserfs reiserfstune # for sysclone
dracut_install killall logger nc nslookup bc chown chroot dd expr kill mkdosfs parted rsync shutdown sort ssh-keygen tr blockdev findfs insmod kexec lvm mdadm mke2fs pivot_root sshd swapon tune2fs mkreiserfs reiserfstune pvcreate lvremove vgremove vgcreate lvcreate lvscan lvchange vgchange pvdisplay lvdisplay vgdisplay blkid dmsetup sfdisk # for sysclone
dracut_install /lib/udev/rules.d/10-dm.rules
dracut_install /lib/udev/rules.d/11-dm-lvm.rules
dracut_install /lib/udev/rules.d/13-dm-disk.rules
dracut_install /lib/udev/rules.d/69-dm-lvm-metad.rules
dracut_install /lib/udev/rules.d/95-dm-notify.rules
+4 -2
View File
@@ -1,9 +1,11 @@
#!/bin/bash
instmods nfs sunrpc
instmods e1000 e1000e virtio_net igb ines sfc mlx4_en cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb ixgbe qlge mptsas mpt2sas mpt3sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net vfat ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_si ipmi_devintf
instmods e1000 e1000e virtio_net igb ines sfc mlx4_en cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb ixgbe qlge mptsas mpt2sas mpt3sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net vfat ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_si ipmi_devintf qlcnic xfs
instmods macvlan macvtap 8021q bridge bonding vmxnet3 cpufreq_ondemand acpi-cpufreq powernow-k8 cdc_ether
instmods mptctl #LSI firmware management requires this
instmods mlx4_ib ib_umad #make the mellanox ib available enough to examine /sys
instmods reiserfs #reiserfs on sysclone
instmods ibmveth # ppc64 virtual ethernet
instmods ibmvscsic # ppc64 virtual disk
instmods ibmvscsi # ppc64 virtual disk
instmods ehea # ppc64 hea ethernet
instmods dm-mod #support LVM for sysclone
+1 -1
View File
@@ -1,4 +1,4 @@
%define version 2.8
%define version 2.9
%ifarch i386 i586 i686 x86
%define tarch x86
%endif
@@ -41,4 +41,4 @@ cd -
%Files
%defattr(-,root,root)
%doc LICENSE.html
/
/opt/xcat/share/xcat/netboot/genesis/builder

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