glance-replicator commands fail due to incorrect regex check
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Undecided
|
Brian Cline |
Bug Description
When I pass correct parameters to the glance-replicator tool I get the following output:
ERROR: Bad format of the given arguments.
rohit@precise-
replication_compare compare <fromserver:port> <toserver:port>
Compare the contents of fromserver with those of toserver.
fromserver:
toserver:port: the location of the slave glance instance.
ERROR: Bad format of the given arguments.
This is due to an incorrect regular expression used int he code to match the input parameters.
The same regex is used by all the replicator functions to verify the parameters:
https:/
SERVER_PORT_REGEX = '\w+:\w+'
The character class \w = [a-zA-Z0-9_]. So if we pass an IP Address or an FQDN having characters outside the set, this check will fail.
The regex should be corrected for glance-replicator to work correctly.
Changed in glance: | |
assignee: | nobody → Rohit Karajgi (rohitkarajgi) |
Changed in glance: | |
status: | New → Confirmed |
assignee: | Rohit Karajgi (rohitk) → Brian Cline (briancline) |
Changed in glance: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | juno-1 → 2014.2 |
A saner regexp would be r'[-a-zA- Z0-9.]+ :\d+'