yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #48130
[Bug 1557459] Re: db purge fails for invalid age_in_days and max_rows
** Changed in: glance
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1557459
Title:
db purge fails for invalid age_in_days and max_rows
Status in Glance:
Invalid
Bug description:
db purge fails for invalid age_in_days and max_rows
Command:
The command 'glance-manage db purge' has two arguments age_in_days and max_rows.
If we give invalid input like string for age_in_days and max_rows it is throwing ValueError.
For example:
$ glance-manage db purge something
LOG:
2016-03-15 09:32:07.197 CRITICAL glance [-] ValueError: invalid
literal for int() with base 10: 'something'
2016-03-15 09:32:07.197 TRACE glance Traceback (most recent call last):
2016-03-15 09:32:07.197 TRACE glance File "/usr/local/bin/glance-manage", line 10, in <module>
2016-03-15 09:32:07.197 TRACE glance sys.exit(main())
2016-03-15 09:32:07.197 TRACE glance File "/opt/stack/glance/glance/cmd/manage.py", line 353, in main
2016-03-15 09:32:07.197 TRACE glance return CONF.command.action_fn(*func_args, **func_kwargs)
2016-03-15 09:32:07.197 TRACE glance File "/opt/stack/glance/glance/cmd/manage.py", line 160, in purge
2016-03-15 09:32:07.197 TRACE glance age_in_days = int(age_in_days)
2016-03-15 09:32:07.197 TRACE glance ValueError: invalid literal for int() with base 10: 'something'
2016-03-15 09:32:07.197 TRACE glance
Command:
$ glance-manage db purge 10 something
LOG:
2016-03-15 09:33:02.122 CRITICAL glance [-] ValueError: invalid literal for int() with base 10: 'something'
2016-03-15 09:33:02.122 TRACE glance Traceback (most recent call last):
2016-03-15 09:33:02.122 TRACE glance File "/usr/local/bin/glance-manage", line 10, in <module>
2016-03-15 09:33:02.122 TRACE glance sys.exit(main())
2016-03-15 09:33:02.122 TRACE glance File "/opt/stack/glance/glance/cmd/manage.py", line 353, in main
2016-03-15 09:33:02.122 TRACE glance return CONF.command.action_fn(*func_args, **func_kwargs)
2016-03-15 09:33:02.122 TRACE glance File "/opt/stack/glance/glance/cmd/manage.py", line 161, in purge
2016-03-15 09:33:02.122 TRACE glance max_rows = int(max_rows)
2016-03-15 09:33:02.122 TRACE glance ValueError: invalid literal for int() with base 10: 'something'
2016-03-15 09:33:02.122 TRACE glance
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1557459/+subscriptions
References