yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #11970
[Bug 1295426] [NEW] "get console output" v3 API should allow "null" as the length
You have been subscribed to a public bug:
If running "nova console-log" command against v3 API, the command fails
like the following:
$ nova --os-compute-api-version 3 console-log vm01
ERROR: Invalid input for field/attribute length. Value: None. None is not of type 'integer', 'string' (HTTP 400) (Request-ID: req-b8588c9b-58a7-4e22-a2e9-30c5354ae4f7)
$
This is because API schema of the API does not allow null as the length of log.
However, get_console_output() of nova-compute allows null by the following code:
3942 def get_console_output(self, context, instance, tail_length):
3943 """Send the console output for the given instance."""
3944 instance = instance_obj.Instance._from_db_object(
3945 context, instance_obj.Instance(), instance)
3946 context = context.elevated()
3947 LOG.audit(_("Get console output"), context=context,
3948 instance=instance)
3949 output = self.driver.get_console_output(context, instance)
3950
3951 if tail_length is not None:
3952 output = self._tail_log(output, tail_length)
3953
3954 return output.decode('utf-8', 'replace').encode('ascii', 'replace')
So the API also should allow it.
** Affects: nova
Importance: Undecided
Assignee: Ken'ichi Ohmichi (oomichi)
Status: In Progress
--
"get console output" v3 API should allow "null" as the length
https://bugs.launchpad.net/bugs/1295426
You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova).
References