Skip to content

Commit

Permalink
Merge pull request #2140 from xcat2/master
Browse files Browse the repository at this point in the history
merge from master to 2.12 for xcat2.12.4 release.(3)
  • Loading branch information
zet809 authored Nov 10, 2016
2 parents 8170fe3 + 3512059 commit 9b82c38
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 16 deletions.
33 changes: 33 additions & 0 deletions build-ubunturepo
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ if [ -z "$c_flag" -a -z "$d_flag" ];then
exit 2
fi

USER="xcat"
SERVER="xcat.org"
FILES_PATH="files"
FRS="/var/www/${SERVER}/${FILES_PATH}"
APT_DIR="${FRS}/xcat"
APT_REPO_DIR="${APT_DIR}/repos/apt"

if [ "$c_flag" -a "$d_flag" ];then
printusage
exit 2
Expand Down Expand Up @@ -474,6 +481,32 @@ __EOF__
chgrp root $dep_tar_name
chmod g+w $dep_tar_name

# Decide whether to upload or not (default NOT to upload)
if [ "$UP" != "1" ]; then
echo "Upload not specified, Done! (rerun with UP=1, to upload)"
cd $old_pwd
exit 0
fi

#upload the dep packages
i=0
echo "Uploading debs from xcat-dep to ${APT_REPO_DIR}/xcat-dep/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete xcat-dep $USER@${SERVER}:${APT_REPO_DIR}/
do : ; done

#upload the tarball
i=0
echo "Uploading $dep_tar_name to ${APT_DIR}/xcat-dep/2.x_Ubuntu/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -v --force $dep_tar_name $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/
do : ; done

#upload the README file
cd debs
i=0
echo "Uploading README to ${APT_DIR}/xcat-dep/2.x_Ubuntu/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -v --force README $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/
do : ; done

cd $old_pwd
exit 0
fi
Expand Down
9 changes: 7 additions & 2 deletions xCAT-probe/subcmds/xcatmn
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,14 @@ sub check_disk {
foreach $mountpoint (keys %mountpointinfo) {
if ($mountpointinfo{$mountpoint}{need} > $mountpointinfo{$mountpoint}{available}) {
foreach (@{ $mountpointinfo{$mountpoint}{mount} }) {
$msg .= "'$_' needs $dir_expectedspace_list{$_} G, ";
$msg .= "'$_' needs $dir_expectedspace_list{$_} GiB disk space. ";
}
my $mountmun = $#{$mountpointinfo{$mountpoint}{mount}} +1 ;
if($mountmun >1){
$msg .= "These directories are parts of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough.";
}else{
$msg .= "This directory is a part of file system '$mountpoint'. The free space available in directory '$mountpoint' is $mountpointinfo{$mountpoint}{available} GiB, it is not enough.";
}
$msg .= "These directories are mounted on '$mountpoint', the free space of '$mountpoint' is $mountpointinfo{$mountpoint}{available} G, it isn't enough.";
$rst = 1;
}
}
Expand Down
19 changes: 12 additions & 7 deletions xCAT-server/lib/xcat/plugins/DBobjectdefs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ sub processArgs
}

# check the new object name specified with -n
if ($::command eq "chdef" && $::opt_n && (!isobjnamevalid($::opt_n))) {
if ($::command eq "chdef" && $::opt_n && (!isobjnamevalid($::opt_n,$::opt_t))) {
my $rsp;
$rsp->{data}->[0] = "The new object name \'$::opt_n\' is not valid.Please refer to \"man xcatdb\" for the valid \"xCAT Object Name Format\" ";
xCAT::MsgUtils->message("E", $rsp, $::callback);
Expand Down Expand Up @@ -1546,7 +1546,7 @@ sub defmk
my $invalidobjname = ();
my $invalidnodename = ();
foreach my $node (@::allobjnames) {
unless(isobjnamevalid($node)){
unless(isobjnamevalid($node,$::opt_t)){
$invalidobjname .= ",$node";
}
if (($node =~ /[A-Z]/) && (((!$::opt_t) && (!$::FILEATTRS{$node}{'objtype'})) || ($::FILEATTRS{$node}{'objtype'} eq "node") || ($::opt_t eq "node"))) {
Expand All @@ -1556,7 +1556,7 @@ sub defmk
if ($invalidobjname) {
$invalidobjname =~ s/,//;
my $rsp;
$rsp->{data}->[0] = "The object name \'$invalidnodename\' is invalid, please refer to \"man xcatdb\" for the valid \"xCAT Object Name Format\"";
$rsp->{data}->[0] = "The object name \'$invalidobjname\' is invalid, please refer to \"man xcatdb\" for the valid \"xCAT Object Name Format\"";
xCAT::MsgUtils->message("E", $rsp, $::callback);
$error = 1;
return 1;
Expand Down Expand Up @@ -4542,16 +4542,21 @@ sub initialize_variables
#isobjnamevalid:
#description: check whether the object name is valid
#argument:
# $objname: the objname string
# $objname: the object name string
# $objtype: the object type string
#return:
# 1: valid
# 0: invalid
#-----------------------
sub isobjnamevalid{
my $objname=shift;
#the ip address as a valid object name is a hack for p7IH support
if(($objname !~ /^[a-zA-Z0-9-_]+$/) and !xCAT::NetworkUtils->isIpaddr($objname)){
return 0;
my $objtype=shift;
$objtype="node" unless(defined $objtype and ($objtype ne ""));
if($objtype eq "node"){
#the ip address as a valid node object name is a hack for p7IH support
if(($objname !~ /^[a-zA-Z0-9-_]+$/) and !xCAT::NetworkUtils->isIpaddr($objname)){
return 0;
}
}
return 1;
}
Expand Down
5 changes: 4 additions & 1 deletion xCAT-server/share/xcat/netboot/rh/genimage
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,10 @@ sub generic_post { #This function is meant to leave the image in a state approxi
if(-e "$rootimg_dir/etc/rc3.d/S61xcatpostinit"){
unlink("$rootimg_dir/etc/rc3.d/S61xcatpostinit");
}


if (!-d "$rootimg_dir/opt/xcat/") {
mkdir "$rootimg_dir/opt/xcat/";
}

if(-e "$rootimg_dir/usr/lib/systemd/"){
#if systemd is the service management framework for the diskless image
Expand Down
2 changes: 1 addition & 1 deletion xCAT/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Standards-Version: 3.7.2

Package: xcat
Architecture: amd64 ppc64el
Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.15-2), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat, xcat-buildkit, xcat-probe (>=2.12)
Depends: ${perl:Depends}, xcat-server, xcat-client, libdbd-sqlite3-perl, isc-dhcp-server, apache2, nfs-kernel-server, nmap, bind9, libxml-parser-perl, xinetd, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, ipmitool-xcat (>=1.8.17-1), syslinux[any-amd64], libsys-virt-perl, syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat, xcat-buildkit, xcat-probe (>=2.12)
Description: Server and configuration utilities of the xCAT management project
xcat-server provides the core server and configuration management components of xCAT. This package should be installed on your management server
4 changes: 2 additions & 2 deletions xCAT/xCAT.spec
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ Requires: elilo-xcat xnba-undi
%if %notlenovo
%ifarch i386 i586 i686 x86 x86_64
Requires: syslinux
Requires: ipmitool-xcat >= 1.8.17
Requires: ipmitool-xcat >= 1.8.17-1
%endif

%ifos linux
%ifarch ppc ppc64 ppc64le
Requires: ipmitool-xcat >= 1.8.17
Requires: ipmitool-xcat >= 1.8.17-1
%endif
%endif

Expand Down
2 changes: 1 addition & 1 deletion xCATsn/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Standards-Version: 3.7.2

Package: xcatsn
Architecture: all
Depends: ${perl:Depends}, xcat-server, perl-xcat, xcat-client, libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, dhcp3-server, apache2, expect, nfs-kernel-server, nmap, bind9, ipmitool-xcat (>=1.8.15-2), syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat,libsys-virt-perl, xcat-probe (>=2.12)
Depends: ${perl:Depends}, xcat-server, perl-xcat, xcat-client, libdbd-sqlite3-perl, libxml-parser-perl, tftpd-hpa, tftp-hpa, conserver-xcat, libnet-telnet-perl, dhcp3-server, apache2, expect, nfs-kernel-server, nmap, bind9, ipmitool-xcat (>=1.8.17-1), syslinux-xcat, xnba-undi, xcat-genesis-scripts-ppc64, xcat-genesis-scripts-amd64, elilo-xcat,libsys-virt-perl, xcat-probe (>=2.12)
Recommends: yaboot-xcat
Description: Metapackage for a common, default xCAT service node setup
xCATsn is a service node management package intended for at-scale management, including hardware management and software management.
4 changes: 2 additions & 2 deletions xCATsn/xCATsn.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ Requires: elilo-xcat xnba-undi

%ifarch i386 i586 i686 x86 x86_64
Requires: syslinux
Requires: ipmitool-xcat >= 1.8.17
Requires: ipmitool-xcat >= 1.8.17-1
%endif
%ifos linux
%ifarch ppc ppc64 ppc64le
Requires: ipmitool-xcat >= 1.8.17
Requires: ipmitool-xcat >= 1.8.17-1
%endif
%endif

Expand Down

0 comments on commit 9b82c38

Please sign in to comment.