Ask Your Question
0

glance-replicator: unrecognized arguments?

asked 2016-07-03 12:59:50 -0500

marca gravatar image

I am trying to use glance-replicator, which I installed from the git master branch, but I always get an unrecognized arguments error, even though I think I'm providing the proper arguments.

$ glance-replicator help compare
glance-replicator 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.

So I follow that with:

$ glance-replicator compare az1:9292 az3:9292
usage: glance-replicator [-h] [--chunksize CHUNKSIZE] [--config-dir DIR]
                         [--config-file PATH] [--debug]
                         [--dontreplicate DONTREPLICATE]
                         [--log-config-append PATH]
                         [--log-date-format DATE_FORMAT] [--log-dir LOG_DIR]
                         [--log-file PATH] [--log-format FORMAT]
                         [--mastertoken MASTERTOKEN] [--metaonly] [--nodebug]
                         [--nometaonly] [--nouse-syslog]
                         [--nouse-syslog-rfc-format] [--noverbose]
                         [--nowatch-log-file] [--slavetoken SLAVETOKEN]
                         [--syslog-log-facility SYSLOG_LOG_FACILITY]
                         [--token TOKEN] [--use-syslog]
                         [--use-syslog-rfc-format] [--verbose] [--version]
                         [--watch-log-file]
                         [command] [args]
glance-replicator: error: unrecognized arguments: az3:9292
Please specify one command

Why is this happening?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-03 18:01:37 -0500

marca gravatar image

updated 2016-07-04 11:29:25 -0500

I found the problem. For some reason, the code is using an oslo_config.ListOpt for the args CLI option. ListOpt requires items to be comma-separated. It's weird to have a CLI that uses comma-separated args and the docs for glance-replicator show using spaces as well, so I submitted a patch to change args from using a ListOpt to using a MultiStrOpt. This allows using normal space-separated arguments on the command line. Here's a link to the proposed change:

https://review.openstack.org/#/c/337295/

With this change, it works great:

$ glance-replicator --mastertoken $PRIMARY_AUTH_TOKEN --slavetoken $SECONDARY_AUTH_TOKEN compare az2:9292 az3:9292
2016-07-04 09:15:09.974 24348 WARNING glance.cmd.replicator [-] Image e5297e33-49da-4ee3-9153-95151b30215c entirely missing from the destination
2016-07-04 09:15:10.035 24348 WARNING glance.cmd.replicator [-] Image 63526d83-b4f6-4d7d-ab6a-312464cd9107 entirely missing from the destination
2016-07-04 09:15:10.115 24348 WARNING glance.cmd.replicator [-] Image c2e526ed-262c-4994-a124-f29dfcf76c1f entirely missing from the destination
...
edit flag offensive delete link more

Comments

https://review.openstack.org/337295/ was merged so this is fixed in the latest version of glance.

msabramo gravatar imagemsabramo ( 2016-07-18 13:49:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-07-03 12:59:50 -0500

Seen: 72 times

Last updated: Jul 04 '16