flexera-public / right_st

RightScale ServerTemplate and RightScript tool
MIT License
12 stars 1 forks source link

Delete requests for namespace (-x) templates: template not found keeps trying to delete scripts #37

Closed mark-dotson-rs closed 7 years ago

mark-dotson-rs commented 7 years ago

Today I double-tapped the delete operation for a template prefixed with 'mark' (-x mark) for a template and it told me that the template did not exist so it would do nothing.

... and then tried to delete right scripts anyways.


ServerTemplate 'mark_RightScale Docker Host RS_OPS RL10 - 2017q1' does not exist, no need to delete

Deleting RightScript 'mark_SYS set hostname RL10_v2' HREF /api/right_scripts/589040003
Failed to delete RightScript rightscripts/SYS_set_hostname_RL10_v2.sh: invalid response 422 Unprocessable Entity: ActionNotAllowed: Cannot delete as the RightScript (HEAD/committed revision) is being used by one or more ServerTemplates.

Deleting RightScript 'mark_SYS Timezone set - 11H1 RL10_v2' HREF /api/right_scripts/589041003
Failed to delete RightScript rightscripts/SYS_Timezone_set-11H1_RL10_v2.sh: invalid response 422 Unprocessable Entity: ActionNotAllowed: Cannot delete as the RightScript (HEAD/committed revision) is being used by one or more ServerTemplates.
....
mark-dotson-rs commented 7 years ago

praxis@praxtop3:~/rs_ops_server_templates(OPS-4192_consul_vault_backups_failing_when_executed_via_cron) $ right_st --version right_st v1.6.1 - 2017-03-10 00:43:57 - bf952aa3973ede2e058f5d0f09bf805033f10f17

douglaswth commented 7 years ago

This was the intended behavior because the ServerTemplate YAML specified those scripts.