[2.6] Commissioning script upload via CLI without name specified causes "Internal Server Error"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Lee Trager | ||
2.6 |
Fix Released
|
High
|
Lee Trager |
Bug Description
MAAS 2.6, packages: https:/
ubuntu@
ubuntu@
500 Internal Server Error
Content-Length: 30
Content-Type: text/plain; charset=utf-8
Date: Wed, 03 Jul 2019 18:20:01 GMT
Server: TwistedWeb/17.9.0
Status: 500
Vary: Cookie
X-Frame-Options: SAMEORIGIN
No active exception to reraise
ubuntu@
2019-07-03 18:19:38 regiond: [info] ::1 GET /MAAS/rpc/ HTTP/1.1 --> 200 OK (referrer: -; agent: provisioningser
2019-07-03 18:20:01 maasserver: [error] #######
2019-07-03 18:20:01 maasserver: [error] Traceback (most recent call last):
File "/usr/lib/
response = wrapped_
File "/usr/lib/
return view_atomic(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/usr/lib/
response = upcall(request, *args, **kwargs)
File "/usr/lib/
response = func(*args, **kwargs)
File "/usr/lib/
srl = emitter(result, typemapper, handler, fields, anonymous)
File "/usr/lib/
raise
RuntimeError: No active exception to reraise
If you will add a "name" parameter to CLI command - everything is fine and command will finish successfully:
ubuntu@
200 OK
Content-Length: 103
Content-Type: application/json; charset=utf-8
Date: Wed, 03 Jul 2019 18:21:36 GMT
Server: TwistedWeb/17.9.0
Status: 200
Vary: Authorization, Cookie
X-Frame-Options: SAMEORIGIN
X-Maas-Api-Hash: d61a4a1be732e65
Success.
Machine-readable output follows:
{
"name": "abc",
"content": "",
"resource_uri": "/MAAS/
}
ubuntu@
However, if name is specified in script metadata, CLI uploading is not possible even when specifying script name via CLI parameter:
ubuntu@
ubuntu@
ubuntu@
#!/bin/bash -x
# --- Start MAAS 1.0 script metadata ---
# name: 00-hp-array-
# type: commissioning
# title: Configure HP Smart Array controllers on HP systems
# description: Configure HP Smart Array Controllers
# script_type: commissioning
# destructive: True
# tags: configure_hba commissioning
# --- End MAAS 1.0 script metadata ---
echo "hello"
ubuntu@
500 Internal Server Error
Content-Length: 30
Content-Type: text/plain; charset=utf-8
Date: Wed, 03 Jul 2019 18:27:19 GMT
Server: TwistedWeb/17.9.0
Status: 500
Vary: Cookie
X-Frame-Options: SAMEORIGIN
No active exception to reraise
ubuntu@
500 Internal Server Error
Content-Length: 30
Content-Type: text/plain; charset=utf-8
Date: Wed, 03 Jul 2019 18:27:26 GMT
Server: TwistedWeb/17.9.0
Status: 500
Vary: Cookie
X-Frame-Options: SAMEORIGIN
No active exception to reraise
Related branches
- Lee Trager (community): Approve
-
Diff: 253 lines (+126/-50)4 files modifiedsrc/maasserver/api/commissioning_scripts.py (+6/-3)
src/maasserver/api/tests/test_commissioning.py (+39/-1)
src/maasserver/forms/script.py (+68/-46)
src/maasserver/forms/tests/test_script.py (+13/-0)
- Newell Jensen (community): Approve
-
Diff: 253 lines (+126/-50)4 files modifiedsrc/maasserver/api/commissioning_scripts.py (+6/-3)
src/maasserver/api/tests/test_commissioning.py (+39/-1)
src/maasserver/forms/script.py (+68/-46)
src/maasserver/forms/tests/test_script.py (+13/-0)
tags: | added: field-medium |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.7.0alpha1 |
Changed in maas: | |
assignee: | nobody → Lee Trager (ltrager) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Subscribing field-medium as this is not blocking customer delivery, but customer complained about it.