← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1112134] Re: Cannot specify binary files as injected_files by "nova boot --file".

 

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

** Changed in: nova
    Milestone: None => grizzly-3

-- 
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/1112134

Title:
  Cannot specify binary files as injected_files by "nova boot --file".

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  If specifying some binary files as injected_files by "nova boot --file",
  the command fails like the following:

  $ ls -lh memo.tar.gz
  -rw-rw-r-- 1 oomichi oomichi 191 Feb  1 13:37 memo.tar.gz
  $
  $ nova --debug boot --flavor 1 --image cirros-0.3.0-x86_64-uec --file /memo.tar.gz=./memo.tar.gz test01
  [..]
  2013-02-01T13:41:51.809733   POST   http://192.168.0.30:8774/v2/95cbfd9b7453468b90c4738abb910113/servers
  RESP: [400] {'date': 'Fri, 01 Feb 2013 04:41:52 GMT', 'content-length': '127', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-a12aec93-401c-4dbe-9c9e-535220a2b35b'}
  RESP BODY: {"badRequest": {"message": "UnicodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte", "code": 400}}

  DEBUG (shell:578) UnicodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte (HTTP 400) (Request-ID: req-a12aec93-401c-4dbe-9c9e-535220a2b35b)
  Traceback (most recent call last):
    File "/opt/stack/python-novaclient/novaclient/shell.py", line 575, in main
      OpenStackComputeShell().main(sys.argv[1:])
    File "/opt/stack/python-novaclient/novaclient/shell.py", line 511, in main
      args.func(self.cs, args)
    File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 279, in do_boot
      server = cs.servers.create(*boot_args, **boot_kwargs)
    File "/opt/stack/python-novaclient/novaclient/v1_1/servers.py", line 585, in create
      **boot_kwargs)
    File "/opt/stack/python-novaclient/novaclient/v1_1/base.py", line 162, in _boot
      return_raw=return_raw, **kwargs)
    File "/opt/stack/python-novaclient/novaclient/base.py", line 145, in _create
      _resp, body = self.api.client.post(url, body=body)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 241, in post
      return self._cs_request(url, 'POST', **kwargs)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 225, in _cs_request
      **kwargs)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 207, in _time_request
      resp, body = self.request(url, method, **kwargs)
    File "/opt/stack/python-novaclient/novaclient/client.py", line 201, in request
      raise exceptions.from_response(resp, body, url, method)
  BadRequest: UnicodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte (HTTP 400) (Request-ID: req-a12aec93-401c-4dbe-9c9e-535220a2b35b)
  ERROR: UnicodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte (HTTP 400) (Request-ID: req-a12aec93-401c-4dbe-9c9e-535220a2b35b)
  $

  Appendix:
  The above example is operated by a small binary file.
  If you need to specify a big file, the following settings are necessary:

  -- nova.conf --
  osapi_max_request_body_size=<bytes>
  quota_injected_file_content_bytes=<bytes>

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