Commissioning script with CRLF line break is failing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Lee Trager |
Bug Description
tl;dr: commissioning script will fail if it's using CRLF instead of LF line break.
Steps to reproduce:
1. Ensure we have two files, first with CRLF, second with LF:
vgrevtsev@
11 0 test-crlf.sh
0 11 test-lf.sh
The scripts are almost equal to each other, except of the script metadata: https:/
2. Upload them to the MAAS via UI
3. Try to commission the machine
4. test-lf will pass, test-crlf will fail:
$ maas admin node-script-result update 6wbc4m current-
$ maas admin node-script-results read 6wbc4m include_output=true | pastebinit
http://
$ echo "W0Vycm5vIDJdIE
[Errno 2] No such file or directory: '/tmp/user_
Related branches
- Alberto Donato (community): Approve
- MAAS Lander: Needs Fixing
-
Diff: 75 lines (+37/-2)2 files modifiedsrc/maasserver/models/tests/test_versionedtextfile.py (+16/-1)
src/maasserver/models/versionedtextfile.py (+21/-1)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Lee Trager (ltrager) |
Changed in maas: | |
milestone: | 2.7.0b1 → 2.7.0b2 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The attached branch will automatically convert any script uploaded to MAAS LF(Unix).