microstack.openstack wrapper can't correctly passthrough command line arguments with special characters like whitespace

Bug #1982088 reported by Weii Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MicroStack
In Progress
Undecided
Unassigned

Bug Description

microstack.openstack wrapper provided by snap failed to passthrough command line arguments with special characters like whitespace.

To reproduce this error, on microstack version: ussuri revision: 245

$ microstack.openstack domain create \
--description "description with whitespace" test
usage: openstack domain create [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width]
                               [--print-empty] [--description <description>] [--enable | --disable] [--or-show]
                               <domain-name>
openstack domain create: error: unrecognized arguments: whitespaces test

The problem is due to the missing double quotes in Line 12 of ./snap-wrappers/openstack/openstack-wrapper, a simple patch like this confirmed fixing this issue.

$ diff a/snap-wrappers/openstack/openstack-wrapper b/snap-wrappers/openstack/openstack-wrapper
12c12
< exec $@
---
> exec "$@"

Weii Wang (weii-wang)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to microstack (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/x/microstack/+/850296

Changed in microstack:
status: New → In Progress
Revision history for this message
Weii Wang (weii-wang) wrote :

I proposed a simple fix for this problem:

https://review.opendev.org/c/x/microstack/+/850296

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.