Provide the ability to adjust a script's timeout value
Bug #1889119 reported by
Jose Delarosa
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Wishlist
|
Unassigned | ||
maas-ui |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
From bug 1888721, I understand that scripts can't be directly edited, but can arguments be passed or read from a user-defined environment variable?
Changed in maas-ui: | |
importance: | Undecided → Unknown |
To post a comment you must log in.
When I originally designed the hardware testing frame work I had planned to accept many types of user parameters. I was able to implement runtime input before we decided to not accept string, int, bool, etc types. The implementation is pretty basic but it may do what you want. You can add a runtime parameter to any script. By default the runtime will be the timeout value. If a user specifies a runtime it will override the timeout with the runtime. Runtime is only passed to the script as the environment variable $RUNTIME. Using the attached script as an example you can change the timeout from 5 minutes to 42 seconds as follows
maas $PROFILE machine test $SYSTEM_ID testing_ scripts= user-timeout runtime=42
Runtime input is only accept over the API and must be given in seconds.
This requires the script to be modified to accept the runtime parameter so you'll still need to create a separate copy of any builtin script you want to use this with. Is this what you're looking for? Why do you need to change the timeout of any of the builtin scripts?