Skip to content

Commit

Permalink
openshift app assisted: set HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Jul 30, 2024
1 parent 24a7e54 commit 5cb7545
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
#

export HOME=${HOME:-/root}

oc create -f 99-metal3-provisioning.yaml >/dev/null 2>&1 || oc patch provisioning provisioning-configuration --type merge -p '{"spec":{"watchAllNamespaces": true}}'

oc -n open-cluster-management wait --for=condition=complete multiclusterhub/multiclusterhub --timeout=10m
Expand Down Expand Up @@ -27,8 +29,8 @@ export RHCOS_ROOTFS=http://${BAREMETAL_IP}/rhcos-live-rootfs.x86_64.img

export MINOR=$(openshift-install version | head -1 | cut -d' ' -f2 | cut -d. -f1,2)

export PULLSECRET=$(cat {{ pull_secret|default('~/openshift_pull.json')|pwd_path }} | tr -d [:space:])
export SSH_PRIV_KEY=$(cat {{ pub_key|default('~/.ssh/id_rsa') }} |sed "s/^/ /")
export PULLSECRET=$(cat {{ pull_secret|default('$HOME/openshift_pull.json')|pwd_path }} | tr -d [:space:])
export SSH_PRIV_KEY=$(cat {{ pub_key|default('$HOME/.ssh/id_rsa') }} |sed "s/^/ /")
export VERSION=$(openshift-install coreos print-stream-json | jq -r '.["architectures"]["x86_64"]["artifacts"]["metal"]["release"]')
export RELEASE=$(openshift-install version | grep 'release image' | cut -d' ' -f3)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
#

export HOME=${HOME:-/root}

oc create -f 99-metal3-provisioning.yaml >/dev/null 2>&1 || oc patch provisioning provisioning-configuration --type merge -p '{"spec":{"watchAllNamespaces": true}}'

oc wait --for=condition=available multiclusterengine/multiclusterengine --timeout=10m
Expand Down Expand Up @@ -27,8 +29,8 @@ export RHCOS_ROOTFS=http://${BAREMETAL_IP}/rhcos-live-rootfs.x86_64.img

export MINOR=$(openshift-install version | head -1 | cut -d' ' -f2 | cut -d. -f1,2)

export PULLSECRET=$(cat {{ pull_secret|default('~/openshift_pull.json')|pwd_path }} | tr -d [:space:])
export SSH_PRIV_KEY=$(cat {{ pub_key|default('~/.ssh/id_rsa') }} |sed "s/^/ /")
export PULLSECRET=$(cat {{ pull_secret|default('$HOME/openshift_pull.json')|pwd_path }} | tr -d [:space:])
export SSH_PRIV_KEY=$(cat {{ pub_key|default('$HOME/.ssh/id_rsa') }} |sed "s/^/ /")
export VERSION=$(openshift-install coreos print-stream-json | jq -r '.["architectures"]["x86_64"]["artifacts"]["metal"]["release"]')
export RELEASE=$(openshift-install version | grep 'release image' | cut -d' ' -f3)

Expand Down
2 changes: 1 addition & 1 deletion kvirt/providers/vsphere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt'
if imageobj is None:
return {'result': 'failure', 'reason': f"Image {image} not found"}
datastores = self._datastores_datacenters()
if datastores[pool] != self.dc.name:
if os.path.basename(datastores[pool]) != self.dc.name:
return {'result': 'failure', 'reason': f"Pool {pool} doesn't belong to Datacenter {self.dc.name}"}
if imagepool is None:
devices = imageobj.config.hardware.device
Expand Down

0 comments on commit 5cb7545

Please sign in to comment.