Fixes LP: #1711700 - Improve DNS reloading so its happens only when required.
This refactors all the the database triggers that alert all the active regions that DNS needs to be reloaded. The refactor ensures that DNS actually needs to be reloaded by checking to ensure that data was adjusted that requires a reload.
Trigger also now provide a proper message on what caused it to request the reload to be perform. The reload code now looks at the reasons and prints a log message each time it actually performs a reload for the reason it was performed.
Set environment variables for output locations and send any results created.
The maas_run_remote_scripts command which executes all commissioning and
testing scripts now export the OUTPUT_COMBINED_PATH, OUTPUT_STDOUT_PATH,
OUTPUT_STDERR_PATH, and RESULT_PATH. These variables are the paths to the
output files maas_run_remote_scripts sends back to MAAS. The RESULT_PATH is an
optional YAML file created by the script. This YAML file defines the scripts
results and what the script result status should be set to.
During commissioning and testing nodes may now send a result YAML file. The
result YAML may define the script result(passed, failed, or degraded) which
overrides using the exit_status to define the script_status. The result YAML
may also include results which is a dictionary of results from the script
which will be displayed over the API and UI. The result YAML file is
validated and an invalid YAML will be logged but still stored or later
viewing.
Nodes may also signal when installation begins. If a node signals failure
when the script_status is INSTALLING the status will be set to
FAILED_INSTALLING.
* Any commands not specific to the rack controller will
now be available in /usr/lib/maas/maas-common.
* Add a symbolic link in the snap to point to the maas-rack
command.
* Add buildout rules to generate bin/maas-common.
* Change packaging to have maas-common depend on
the Python code for the provisioning server, so that the
command can successfully run.
* Rename some scripts in /usr/lib/maas to remove the
redundant maas- prefix, and prevent conflicts with
the old packaging.
* Update the debhelper compat level to 9, so dh-exec
can be used to copy and rename files in the same step
in .install files.
* Rename get_maas_provision_command() to
get_maas_common_command().