[Yahoo-eng-team] [Bug 1441922] Re: Keystone V3 authentication return BadRequest: Malformed request url

2015-05-07 Thread Jin Liu
Code change is not needed on Cinder/Nova server, just some conf to use
keystone v3 authentication.

** Changed in: cinder
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1441922

Title:
  Keystone V3 authentication return BadRequest: Malformed request url

Status in Cinder:
  Invalid
Status in OpenStack Compute (Nova):
  Triaged

Bug description:
  When using keystone V3 authentication for cinder and nova (see comment #3), I 
got error "BadRequest: Malformed request url (HTTP 400)".
  I am testing on Juno release, my keystone v3 env is like this,

  export OS_USERNAME="admin"
  export OS_PASSWORD="password"
  export OS_DOMAIN_NAME=default
  export OS_AUTH_URL="http://$MY_HOST:35357/v3";
  export OS_IDENTITY_API_VERSION=3

  My endpoint of cinder public URL is like 
http://**.**.**.**:8776/v1/cbe4b1d87fbb4318be379a79a570b7ec (I hided the real 
IP)
  When run command "openstack --debug volume list" or "openstack --debug volume 
create --size 1 jin", I got this BadRequest error. From debug info, this error 
comes from cinder server. I added log in cinder/api/openstack/wsgi.py function 
_process_stack(), found the context.project_id is None while project_id has a 
value, here return the error.

  if (context and project_id and (project_id != context.project_id)):
  msg = _("Malformed request url")
  return Fault(webob.exc.HTTPBadRequest(explanation=msg))

  I compared with another keystone V2 authentication server, the 
context.project_id is same as project_id. Maybe this is difference, in v2 
server the REQ has one more Project-id like "curl -i -H "X-Auth-Project-Id: 
admin".
  I found the cinder.context maybe come from cinder/api/middleware/auth.py, the 
project_id in cinder.context may not be assigned a value in keystone v3 
authentication scenario.

  ERROR log is as below:

  REQ: curl -i
  http://**.**.**.**:8776/v1/cbe4b1d87fbb4318be379a79a570b7ec/volumes/detail
  -X GET -H "User-Agent: python-cinderclient" -H "Accept:
  application/json" -H "X-Auth-Token: e883e05a887144d4ae70151c976ce666"

  INFO: requests.packages.urllib3.connectionpool Starting new HTTP connection 
(1): **.**.**.**
  DEBUG: requests.packages.urllib3.connectionpool "GET 
/v1/cbe4b1d87fbb4318be379a79a570b7ec/volumes/detail HTTP/1.1" 400 65
  DEBUG: cinderclient.client RESP: [400] {'date': 'Thu, 09 Apr 2015 00:35:30 
GMT', 'content-length': '65', 'content-type': 'application/json; 
charset=UTF-8', 'x-compute-request-id': 
'req-39a96150-b9ab-4753-8b02-d5730492b288', 'x-openstack-request-id': 
'req-39a96150-b9ab-4753-8b02-d5730492b288'}
  RESP BODY: {"badRequest": {"message": "Malformed request url", "code": 400}}

  ERROR: openstack Malformed request url (HTTP 400) (Request-ID: 
req-39a96150-b9ab-4753-8b02-d5730492b288)
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/cliff/app.py", line 280, in 
run_subcommand
  result = cmd.run(parsed_args)
    File "/usr/lib/python2.7/site-packages/cliff/display.py", line 91, in run
  column_names, data = self.take_action(parsed_args)
    File 
"/usr/lib/python2.7/site-packages/openstackclient/volume/v1/volume.py", line 
255, in take_action
  data = volume_client.volumes.list(search_opts=search_opts)
    File "/usr/lib/python2.7/site-packages/cinderclient/v1/volumes.py", line 
220, in list
  "volumes")
    File "/usr/lib/python2.7/site-packages/cinderclient/base.py", line 70, in 
_list
  resp, body = self.api.client.get(url)
    File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 302, 
in get
  return self._cs_request(url, 'GET', **kwargs)
    File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 269, 
in _cs_request
  **kwargs)
    File "/usr/lib/python2.7/site-packages/cinderclient/client.py", line 252, 
in request
  raise exceptions.from_response(resp, body)
  BadRequest: Malformed request url (HTTP 400) (Request-ID: 
req-39a96150-b9ab-4753-8b02-d5730492b288)

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1441922/+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 1361963] [NEW] No default control_exchange configuration prompt in glance-api.conf

2014-08-26 Thread Jin Liu
Public bug reported:

In current default glance-api.conf, messaging configurations as below,
but actually 'rabbit_notification_exchange = glance' and
'qpid_notification_exchange = glance' do not impact topic consumer_queue
creation. because Oslo .messaging uses 'control_exchange' as queue name,
default value is 'openstack'.  other component such as cinder has
written ''control_exchange=cinder'' into cinder conf.  glance should do
same change as well.

# Messaging driver used for 'messaging' notifications driver
# rpc_backend = 'rabbit'

# Configuration options if sending notifications via rabbitmq (these are
# the defaults)
rabbit_host = localhost
rabbit_port = 5672
rabbit_use_ssl = false
rabbit_userid = guest
rabbit_password = guest
rabbit_virtual_host = /
rabbit_notification_exchange = glance
rabbit_notification_topic = notifications
rabbit_durable_queues = False

# Configuration options if sending notifications via Qpid (these are
# the defaults)
qpid_notification_exchange = glance
qpid_notification_topic = notifications
qpid_hostname = localhost
qpid_port = 5672
qpid_username =
qpid_password =
qpid_sasl_mechanisms =
qpid_reconnect_timeout = 0
qpid_reconnect_limit = 0
qpid_reconnect_interval_min = 0
qpid_reconnect_interval_max = 0
qpid_reconnect_interval = 0

** Affects: glance
 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/1361963

Title:
  No default control_exchange configuration prompt in glance-api.conf

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

Bug description:
  In current default glance-api.conf, messaging configurations as below,
  but actually 'rabbit_notification_exchange = glance' and
  'qpid_notification_exchange = glance' do not impact topic
  consumer_queue creation. because Oslo .messaging uses
  'control_exchange' as queue name, default value is 'openstack'.  other
  component such as cinder has written ''control_exchange=cinder'' into
  cinder conf.  glance should do same change as well.

  # Messaging driver used for 'messaging' notifications driver
  # rpc_backend = 'rabbit'

  # Configuration options if sending notifications via rabbitmq (these are
  # the defaults)
  rabbit_host = localhost
  rabbit_port = 5672
  rabbit_use_ssl = false
  rabbit_userid = guest
  rabbit_password = guest
  rabbit_virtual_host = /
  rabbit_notification_exchange = glance
  rabbit_notification_topic = notifications
  rabbit_durable_queues = False

  # Configuration options if sending notifications via Qpid (these are
  # the defaults)
  qpid_notification_exchange = glance
  qpid_notification_topic = notifications
  qpid_hostname = localhost
  qpid_port = 5672
  qpid_username =
  qpid_password =
  qpid_sasl_mechanisms =
  qpid_reconnect_timeout = 0
  qpid_reconnect_limit = 0
  qpid_reconnect_interval_min = 0
  qpid_reconnect_interval_max = 0
  qpid_reconnect_interval = 0

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1361963/+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 1361081] [NEW] v1&v2 creation interface prompts differences when Image name exceeds limit

2014-08-25 Thread Jin Liu
Public bug reported:

v1 api gives clear prompt as below,

linux:˜/source> glance image-create 
--name="cirros-0.3.2-x86_64-"
 --disk-format=qcow2 \
>   --container-format=bare --is-public=true --min-disk=133766616\
>   --copy-from 
> http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
Request returned failure status 400.


  400 Bad Request


  400 Bad Request
  Image name too long: 820


 (HTTP 400)

v2 gives blur prompt,
# glance  --os-image-api-version 2 image-create --name 
Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.
 --disk-format=qcow2 --container-format=bare < cirros-0.3.2-x86_64-disk.img

Unable to set 'name' to
'Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.'

** Affects: glance
 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/1361081

Title:
  v1&v2 creation interface prompts differences when Image name exceeds
  limit

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

Bug description:
  v1 api gives clear prompt as below,

  linux:˜/source> glance image-create 
--name="cirros-0.3.2-x86_64-"
 --disk-format=qcow2 \
  >   --container-format=bare --is-public=true --min-disk=133766616\
  >   --copy-from 
http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
  Request returned failure status 400.
  
  
400 Bad Request
  
  
400 Bad Request
Image name too long: 820

  
   (HTTP 400)

  v2 gives blur prompt,
  # glance  --os-image-api-version 2 image-create --name 
Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.
 --disk-format=qcow2 --container-format=bare < cirros-0.3.2-x86_64-disk.img

  Unable to set 'name' to
  
'Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenameistoolong.Thisimagenam

[Yahoo-eng-team] [Bug 1359017] Re: Returning unprecise error message when you create image with long name

2014-08-20 Thread Jin Liu
I tried this case in the latest Juno master, I find it's ok now

linux:˜/source> glance image-create 
--name="cirros-0.3.2-x86_64-"
 --disk-format=qcow2 \
>   --container-format=bare --is-public=true --min-disk=133766616\
>   --copy-from 
> http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
Request returned failure status 400.


  400 Bad Request


  400 Bad Request
  Image name too long: 820


 (HTTP 400)

** 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/1359017

Title:
  Returning unprecise error message when you create image with long name

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

Bug description:
  Image creation fails when the image name is > 255 chars, but the error
  message does not indicate that name length is the issue.  Note that
  double byte names work if they do not exceed the Glance length limit.

  Upon clicking on Import button from GUI, console displayed below 500 internal 
error message:
  ==
  Error
  An error occurred while creating image Test to see if text counter can handle 
double byte.Test to see if text counter can handle double byte..

  Explanation: The server encountered an unexpected error: 500 (Internal
  Server Error).

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1359017/+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 1359017] [NEW] Returning unprecise error message when you create image with long name

2014-08-19 Thread Jin Liu
Public bug reported:

Image creation fails when the image name is > 255 chars, but the error
message does not indicate that name length is the issue.  Note that
double byte names work if they do not exceed the Glance length limit.

Upon clicking on Import button from GUI, console displayed below 500 internal 
error message:
==
Error
An error occurred while creating image Test to see if text counter can handle 
double byte.Test to see if text counter can handle double byte..

Explanation: The server encountered an unexpected error: 500 (Internal
Server Error).

** Affects: glance
 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/1359017

Title:
  Returning unprecise error message when you create image with long name

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

Bug description:
  Image creation fails when the image name is > 255 chars, but the error
  message does not indicate that name length is the issue.  Note that
  double byte names work if they do not exceed the Glance length limit.

  Upon clicking on Import button from GUI, console displayed below 500 internal 
error message:
  ==
  Error
  An error occurred while creating image Test to see if text counter can handle 
double byte.Test to see if text counter can handle double byte..

  Explanation: The server encountered an unexpected error: 500 (Internal
  Server Error).

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1359017/+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