Skip to content

Commit

Permalink
FIX: silencious and alwais successfuly
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred78290 committed Oct 9, 2024
1 parent f8d3902 commit 22591ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
14 changes: 7 additions & 7 deletions bin/plateform/cloudstack/plateform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ function get_serviceoffering_id() {
name=$1 \
projectid=${CLOUDSTACK_PROJECT_ID} \
zoneid=${CLOUDSTACK_ZONE_ID} \
| jq -r --arg NAME "$1" '.serviceoffering[]|select(.name == $NAME)|.id//""'
| jq -r --arg NAME "$1" '.serviceoffering[]|select(.name == $NAME)|.id//""' 2> /dev/null || :
}

#===========================================================================================================================================
Expand All @@ -1001,7 +1001,7 @@ function get_image_uuid() {
name=${TARGET_IMAGE} \
templatefilter=self \
projectid=${CLOUDSTACK_PROJECT_ID} \
hypervisor=${CLOUDSTACK_HYPERVISOR} | jq -r '.template[0].id//""'
hypervisor=${CLOUDSTACK_HYPERVISOR} | jq -r '.template[0].id//""' 2> /dev/null || :
}

#===========================================================================================================================================
Expand All @@ -1017,7 +1017,7 @@ function get_vmuuid() {
podid=${CLOUDSTACK_POD_ID} \
clusterid=${CLOUDSTACK_CLUSTER_ID} \
hypervisor=${CLOUDSTACK_HYPERVISOR} \
| jq -r '.virtualmachine[0].id//""'
| jq -r '.virtualmachine[0].id//""' 2> /dev/null || :
}

#===========================================================================================================================================
Expand All @@ -1031,7 +1031,7 @@ function get_net_type() {
zoneid=${CLOUDSTACK_ZONE_ID} \
podid=${CLOUDSTACK_POD_ID} \
clusterid=${CLOUDSTACK_CLUSTER_ID} \
| jq -r --arg NAME "${NAME}" '.network[]|select(.name == $NAME)|.traffictype//""'
| jq -r --arg NAME "${NAME}" '.network[]|select(.name == $NAME)|.traffictype//""' 2> /dev/null || :
}

#===========================================================================================================================================
Expand All @@ -1045,7 +1045,7 @@ function get_network_id() {
zoneid=${CLOUDSTACK_ZONE_ID} \
podid=${CLOUDSTACK_POD_ID} \
clusterid=${CLOUDSTACK_CLUSTER_ID} \
| jq -r --arg NAME "${NAME}" '.network[]|select(.name == $NAME)|.id//""'
| jq -r --arg NAME "${NAME}" '.network[]|select(.name == $NAME)|.id//""' 2> /dev/null || :
}

#===========================================================================================================================================
Expand All @@ -1060,7 +1060,7 @@ function get_vpc_id() {
zoneid=${CLOUDSTACK_ZONE_ID} \
podid=${CLOUDSTACK_POD_ID} \
clusterid=${CLOUDSTACK_CLUSTER_ID} \
| jq -r '.network[0].vpcid//""'
| jq -r '.network[0].vpcid//""' 2> /dev/null || :
}

#===========================================================================================================================================
Expand Down Expand Up @@ -1201,7 +1201,7 @@ function prepare_plateform() {
function check_ip_public_free() {
local IP=$1

ID=$(cloudmonkey list publicipaddresses state=free ipaddress=${IP} | jq -r '.publicipaddress[0].id')
ID=$(cloudmonkey list publicipaddresses state=free ipaddress=${IP} | jq -r '.publicipaddress[0].id' 2> /dev/null || :)

if [ -z "${ID}" ]; then
IP=$(nextip ${IP} true)
Expand Down
6 changes: 0 additions & 6 deletions bin/plateform/lxd/image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ config:
package_update: false
package_upgrade: false
ssh_pwauth: true
# write_files:
# - encoding: gzip+base64
# content: $(cat ${CURDIR}/prepare-image.sh | gzip -c9 | base64 -w 0)
# owner: root:adm
# path: /usr/local/bin/prepare-image.sh
# permissions: '0755'
users:
- name: ${KUBERNETES_USER}
groups: users, admin
Expand Down

0 comments on commit 22591ec

Please sign in to comment.