From 9ed73803939a761dc1aed9c76555b444df8cf34a Mon Sep 17 00:00:00 2001 From: Chuck Brazie Date: Fri, 29 Jul 2016 10:47:34 -0400 Subject: [PATCH 1/3] Merged the zVM changes into some xcat_client files Change-Id: I3405cede348c63ea6b43ceda4bdfdad0f3a5422a --- xCAT-client/bin/genimage | 6 ++++++ xCAT-client/bin/xdsh | 16 ++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/xCAT-client/bin/genimage b/xCAT-client/bin/genimage index 4693a56e2..6d803705f 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -57,6 +57,7 @@ sub print_usage print "Usage:\n"; print " genimage\n\n"; print " genimage --dryrun\n\n"; + print ' genimage -o [-a ] -p -i -n [--onlyinitrd] [-r ] [-k ] [-g ] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission ] [--interactive] [--dryrun]'."\n\n"; print ' genimage [-o ] [-a ] [-p ] [-i ] [-n ] [--onlyinitrd] [-r ] [-k ] [-g ] [-m statelite] [-l rootlimitsize] [-t tmplimitsize] [--permission ] [--interactive] [--dryrun] [--noupdate] ' . "\n\n"; print " --permission is used for statelite only\n"; print " -g is used for SLES only\n\n"; @@ -64,6 +65,11 @@ sub print_usage print "Examples:\n"; print " genimage\n"; print " genimage --interactive\n"; + print " genimage -i eth0 -n tg3 -o sles11 -p compute\n"; + print " genimage -i eth0 -n tg3 -o sles11 -p compute --onlyinitrd\n"; + print " genimage -i eth0 -r eth1,eth2 -n tg3,bnx2 -o centos5.1 -p compute --interactive\n"; + print " genimage -i eth0 -n tg3,bnx2 -o sles11 -p compute --dryrun\n"; + print " genimage -i eth0 -n igb,e1000e,e1000,bnx2,tg3 -o centos5.4 -p nfsroot --permission 777\n"; print " genimage -i eth0 -n tg3 --interactive myimagename\n"; print " genimage myimagename\n"; } diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 1d06e74a9..46e1e94d7 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -38,7 +38,7 @@ This program is the client interface for xdsh/xdcp. Bypass mode is useful, when executing the command on the Management Server and in particular if you want to run as a non-root id. Call parse_args to verify mode (client/server or bypass) - and whether to use Env Variables + and whether to use Env Variables Build hash and submit request See man page for options @@ -232,6 +232,8 @@ sub parse_args_xdsh 'q|show-config' => \$options{'show-config'}, 'r|node-rsh=s' => \$options{'node-rsh'}, 'i|rootimg=s' => \$options{'rootimg'}, + 'ip=s' => \$options{'ip'}, + 'show=s' => \$options{'show'}, 's|stream' => \$options{'streaming'}, 't|timeout=i' => \$options{'timeout'}, 'v|verify' => \$options{'verify'}, @@ -407,12 +409,12 @@ sub parse_args_xdsh if ($options{'ssh-setup'}) # if going to setup ssh keys { my $msg; - if (!($ENV{'DSH_REMOTE_PASSWORD'})) - { # if not already set - # prompt for the password for the userid on the node that will be setup + if (!($ENV{'DSH_REMOTE_PASSWORD'}) && !$options{'show'} ) + { # if not already set and not requested to just show the information, + # prompt for the password for the userid on the node that will be setup my $userpw; $msg = -"The ssh keys will be updated for '$to_userid' on the node(s).\nPassword:"; + "Enter the password for the userid: $to_userid on the node where the ssh keys \nwill be updated:\n"; xCAT::MsgUtils->message("I", $msg); system("stty -echo"); # turn off keyboard chop($userpw = ); @@ -573,9 +575,11 @@ sub parse_args_xdcp 'F|File=s' => \$options{'File'}, 'h|help' => \$options{'help'}, 'i|rootimg=s' => \$options{'rootimg'}, - 'l|user=s' => \$options{'user'}, + 'ip=s' => \$options{'ip'}, + 'l|user=s' => \$options{'user'}, 'm|monitor' => \$options{'monitor'}, 'o|node-options=s' => \$options{'node-options'}, + 'show=s' => \$options{'show'}, 'q|show-config' => \$options{'show-config'}, 'p|preserve' => \$options{'preserve'}, 'r|c|node-rcp=s' => \$options{'node-rcp'}, From d4080a09a90269a9ca8f79c453e9908a84ddac68 Mon Sep 17 00:00:00 2001 From: Chuck Brazie Date: Tue, 2 Aug 2016 10:56:58 -0400 Subject: [PATCH 2/3] Fix indentation in xdsh --- xCAT-client/bin/xdsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 46e1e94d7..0797f4d93 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -575,11 +575,11 @@ sub parse_args_xdcp 'F|File=s' => \$options{'File'}, 'h|help' => \$options{'help'}, 'i|rootimg=s' => \$options{'rootimg'}, - 'ip=s' => \$options{'ip'}, - 'l|user=s' => \$options{'user'}, + 'ip=s' => \$options{'ip'}, + 'l|user=s' => \$options{'user'}, 'm|monitor' => \$options{'monitor'}, 'o|node-options=s' => \$options{'node-options'}, - 'show=s' => \$options{'show'}, + 'show=s' => \$options{'show'}, 'q|show-config' => \$options{'show-config'}, 'p|preserve' => \$options{'preserve'}, 'r|c|node-rcp=s' => \$options{'node-rcp'}, From f6b94ed332babaf5e7361d013899f0428391e660 Mon Sep 17 00:00:00 2001 From: Chuck Brazie Date: Wed, 26 Oct 2016 15:17:48 -0400 Subject: [PATCH 3/3] Add missing UI files for Apache Change-Id: I84450642b19e1121a529b42603697863dca2817f --- xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 | 15 +++++++++++++++ xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 create mode 100644 xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 diff --git a/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 new file mode 100644 index 000000000..11d5b3445 --- /dev/null +++ b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach22 @@ -0,0 +1,15 @@ +Alias /xcat "/opt/xcat/ui" +PHPINIDir "/opt/xcat/ui" + +# Redirect all http request to https +RewriteEngine On +RewriteCond %{SERVER_PORT} 80 +RewriteCond %{HTTPS} !=on +RewriteRule ^/?xcat/(.*) https://%{SERVER_NAME}/xcat/$1 [R,L] + + + Options FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + diff --git a/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 new file mode 100644 index 000000000..c6a9de325 --- /dev/null +++ b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf.apach24 @@ -0,0 +1,14 @@ +Alias /xcat "/opt/xcat/ui" +PHPINIDir "/opt/xcat/ui" + +# Redirect all http request to https +RewriteEngine On +RewriteCond %{SERVER_PORT} 80 +RewriteCond %{HTTPS} !=on +RewriteRule ^/?xcat/(.*) https://%{SERVER_NAME}/xcat/$1 [R,L] + + + Options +FollowSymLinks + AllowOverride None + Require all granted +