[Yahoo-eng-team] [Bug 1493026] Re: location-add return error when add new location to 'queued' image

2016-01-14 Thread OpenStack Infra
Reviewed:  https://review.openstack.org/242535
Committed: 
https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=cea67763c9f8037f47844e3e057166d6874d801d
Submitter: Jenkins
Branch:master

commit cea67763c9f8037f47844e3e057166d6874d801d
Author: kairat_kushaev 
Date:   Fri Nov 6 18:16:30 2015 +0300

Remove location check from V2 client

Glance client has a custom check that generates exception if
location has not been returned by image-get request.
This check should on server side and it should be managed by
policy rules when do location-add action.
That also allows to increase possibility of migrating Heat
to v2[1].

NOTE: After this patch, we'll raise a HTTPBadRequest from
server side instead of HTTPConflict when a user adds a
duplicate location.

[1]: https://review.openstack.org/#/c/240450/

Co-Authored-By: wangxiyuan 

Change-Id: I778ad2a97805b4d85eb0430c603c27a0a1c148e0
Closes-bug: #1493026


** Changed in: python-glanceclient
   Status: In Progress => Fix Released

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

Title:
  location-add return error when add new location to 'queued' image

Status in Glance:
  Opinion
Status in python-glanceclient:
  Fix Released

Bug description:
  Reproduce:

  1. create a new image:
  glance image-create --disk-format qcow2 --container-format bare --name test

  suppose the image'id is 1

  2.add location to the image:

  glance location-add 1 --url 

  Result :  the client raise an error:'The administrator has disabled
  API access to image locations'.

  3.set show_multiple_locations = True in glance-api.conf. Then take
  step 1,2. It works now.

  But when use REST API to reproduce it, No matter
  show_multiple_locations is False or True, it runs both well and the
  image's status will be changed into 'active'.

  So there is one thing to discuess: Is it need to check the location in
  glance-client(show_multiple_locations)? Or Is it need to add the check
  like glance-client does in Glance server on the contrary?

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1493026] Re: location-add return error when add new location to 'queued' image

2015-10-31 Thread wangxiyuan
** Description changed:

  Reproduce:
  
  1. create a new image:
  glance image-create --disk-format qcow2 --container-format bare --name test
  
  suppose the image'id is 1
  
  2.add location to the image:
  
  glance location-add 1 --url 
  
  Result :  the client raise an error:'The administrator has disabled API
  access to image locations'.
  
- But when use REST API to reproduce the step 2, it runs well and the image's 
status will be changed into 'active'.
- According to the code: 
https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L735-L750
- I think we should add check in glance like client does.
+ 3.set show_multiple_locations = True in glance-api.conf. Then take step
+ 1,2. It works now.
+ 
+ But when use REST API to reproduce it, No matter show_multiple_locations
+ is False or True, it runs both well and the image's status will be
+ changed into 'active'.
+ 
+ So there are one thing to discuess: Is it need to check the location in
+ glance-client(show_multiple_locations)? Or Is it need to add the check
+ like glance-client does in Glance server on the contrary?

** Also affects: python-glanceclient
   Importance: Undecided
   Status: New

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

Title:
  location-add return error when add new location to 'queued' image

Status in Glance:
  Opinion
Status in python-glanceclient:
  New

Bug description:
  Reproduce:

  1. create a new image:
  glance image-create --disk-format qcow2 --container-format bare --name test

  suppose the image'id is 1

  2.add location to the image:

  glance location-add 1 --url 

  Result :  the client raise an error:'The administrator has disabled
  API access to image locations'.

  3.set show_multiple_locations = True in glance-api.conf. Then take
  step 1,2. It works now.

  But when use REST API to reproduce it, No matter
  show_multiple_locations is False or True, it runs both well and the
  image's status will be changed into 'active'.

  So there are one thing to discuess: Is it need to check the location
  in glance-client(show_multiple_locations)? Or Is it need to add the
  check like glance-client does in Glance server on the contrary?

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1493026] Re: location-add return error when add new location to 'queued' image

2015-09-17 Thread wangxiyuan
don't have any good way to solve it now. need discussion.

** Changed in: glance
   Status: In Progress => Opinion

** Changed in: glance
 Assignee: wangxiyuan (wangxiyuan) => (unassigned)

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

Title:
  location-add return error when add new location to 'queued' image

Status in Glance:
  Opinion

Bug description:
  Reproduce:

  1. create a new image:
  glance image-create --disk-format qcow2 --container-format bare --name test

  suppose the image'id is 1

  2.add location to the image:

  glance location-add 1 --url 

  Result :  the client raise an error:'The administrator has disabled
  API access to image locations'.

  But when use REST API to reproduce the step 2, it runs well and the image's 
status will be changed into 'active'.
  According to the code: 
https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L735-L750
  I think we should add check in glance like client does.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1493026] Re: location-add return error when add new location to 'queued' image

2015-09-15 Thread wangxiyuan
** Description changed:

  Reproduce:
  
  1. create a new image:
  glance image-create --disk-format qcow2 --container-format bare --name test
  
  suppose the image'id is 1
  
  2.add location to the image:
  
  glance location-add 1 --url 
  
- 
- Result :  the client raise an error:'The administrator has disabled API 
access to image locations'.
- 
+ Result :  the client raise an error:'The administrator has disabled API
+ access to image locations'.
  
  But when use REST API to reproduce the step 2, it runs well and the image's 
status will be changed into 'active'.
+ According to the code: 
https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L735-L750
+ I think we should add check in glance like client does.

** Project changed: python-glanceclient => glance

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

Title:
  location-add return error when add new location to 'queued' image

Status in Glance:
  In Progress

Bug description:
  Reproduce:

  1. create a new image:
  glance image-create --disk-format qcow2 --container-format bare --name test

  suppose the image'id is 1

  2.add location to the image:

  glance location-add 1 --url 

  Result :  the client raise an error:'The administrator has disabled
  API access to image locations'.

  But when use REST API to reproduce the step 2, it runs well and the image's 
status will be changed into 'active'.
  According to the code: 
https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L735-L750
  I think we should add check in glance like client does.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp