Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore errors when listing subnets #193

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

nicolasbock
Copy link
Collaborator

On STSStack, the first call to openstack subnets is expected to fail.
The script needs to ignore this failure.

Signed-off-by: Nicolas Bock [email protected]

On STSStack, the first call to `openstack subnets` is expected to fail.
The script needs to ignore this failure.

Signed-off-by: Nicolas Bock <[email protected]>
@nicolasbock nicolasbock self-assigned this May 24, 2024
Copy link
Contributor

@drencrom drencrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the problems wit this code for me

@nicolasbock nicolasbock merged commit cf3e09a into canonical:main May 24, 2024
2 checks passed
@nicolasbock nicolasbock deleted the vip_fix branch May 24, 2024 13:41
@@ -12,10 +12,10 @@ update_master_opts ${MOD_PASSTHROUGH_OPTS[@]}
vip_start=${MASTER_OPTS[VIP_ADDR_START]}
if [[ -z $vip_start ]]; then
# prodstack
cidr=$(source ~/novarc; openstack subnet show subnet_${OS_USERNAME} -c cidr -f value 2>/dev/null)
cidr=$(source ~/novarc; openstack subnet show subnet_${OS_USERNAME} -c cidr -f value 2>/dev/null || true)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original change merged before I looked at it, but using 'subnet list' is maybe the better choice:

openstack subnet list --name subnet_${OS_USERNAME} -c Subnet -f value

I don't have a subnet_brian-haley, but I do have an admin_subnet:
$ openstack subnet list --name subnet_brian-haley -c Subnet -f value
$ openstack subnet list --name brian-haley_admin_subnet -c Subnet -f value
10.5.0.0/16

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On PS6, your username is a little strange. Mine is stg-reproducer-nbock. On STSStack it is nicolasbock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants