← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1216247] Re: glance-replicator commands fail due to incorrect regex check

 

** Changed in: glance
       Status: Fix Committed => Fix Released

** Changed in: glance
    Milestone: None => juno-1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1216247

Title:
  glance-replicator commands fail due to incorrect regex check

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released

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-dev-102:~/devstack$ glance-replicator compare 10.2.3.1:9292  10.2.3.2:9292
  replication_compare compare <fromserver:port> <toserver:port>

      Compare the contents of fromserver with those of toserver.

      fromserver:port: the location of the master glance instance.
      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://github.com/openstack/glance/blob/master/glance/cmd/replicator.py#L58

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1216247/+subscriptions