systemvm: export $TYPE before patching ssvm/cpvm (#2855)

This fixes a regression introduced in #2799, by exporting $TYPE
before the `patch` is called to patch/extract archives for ssvm/cpvm.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2018-09-21 14:19:18 +05:30 committed by GitHub
parent 8da25139b8
commit 70dbfa7883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 9 deletions

View File

@ -135,12 +135,12 @@ public class Upgrade41110to41120 implements DbUpgrade {
final Map<Hypervisor.HypervisorType, String> newTemplateChecksum = new HashMap<Hypervisor.HypervisorType, String>() {
{
put(Hypervisor.HypervisorType.KVM, "f44242570ae4a0b16c4c2eb2cb71fe45");
put(Hypervisor.HypervisorType.XenServer, "afcc31ab9f7635885cd83600eafbbe7f");
put(Hypervisor.HypervisorType.VMware, "54449e31530f14af930c80a3155a308f");
put(Hypervisor.HypervisorType.Hyperv, "7785df30fdbbacdead5acbfc15ae2c98");
put(Hypervisor.HypervisorType.LXC, "f44242570ae4a0b16c4c2eb2cb71fe45");
put(Hypervisor.HypervisorType.Ovm3, "81a6cd8d07fad910824f040f73ce03e3");
put(Hypervisor.HypervisorType.KVM, "6d12cc764cd7d64112d8c35d70923eb1");
put(Hypervisor.HypervisorType.XenServer, "6e8b3ae84ca8145736d1d7d3f7546e65");
put(Hypervisor.HypervisorType.VMware, "e981f8cb951688efd93481913198c9cc");
put(Hypervisor.HypervisorType.Hyperv, "e9032635ffba021371780307162551b9");
put(Hypervisor.HypervisorType.LXC, "6d12cc764cd7d64112d8c35d70923eb1");
put(Hypervisor.HypervisorType.Ovm3, "c4a91f8e52e4531a1c2a9a17c530d5fe");
}
};

View File

@ -150,6 +150,10 @@ get_boot_params() {
esac
}
get_systemvm_type() {
export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE)
}
patch() {
local PATCH_MOUNT=/media/cdrom
local patchfile=$PATCH_MOUNT/cloud-scripts.tgz
@ -216,11 +220,11 @@ start() {
config_guest
get_boot_params
get_systemvm_type
patch
sync
sysctl -p
export TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE)
log_it "Configuring systemvm type=$TYPE"
if [ -f "/opt/cloud/bin/setup/$TYPE.sh" ]; then

View File

@ -21,7 +21,7 @@
# Eject cdrom if any
eject || true
TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE)
TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline)
if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ]
then
if [ -x /opt/cloud/bin/update_config.py ]

View File

@ -19,7 +19,7 @@
set -e
set -x
CLOUDSTACK_RELEASE=4.11.1
CLOUDSTACK_RELEASE=4.11.2
function configure_apache2() {
# Enable ssl, rewrite and auth