From 1c3f44f123802ab9f8e462f7a86c95f230d53d63 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 21 Apr 2021 17:12:00 -0500 Subject: [PATCH] Progress: Redesign enty/exit rule handling, now requiring Action instead of "rule". The Entry and Exit files are using "rule" to designate a Rule to operate. This is designed on the assumption that an Entry always runs a "start" and Exit always runs a "stop". This behavior is changed such that "rule" is no longer specified and one of the 9 supported Actions may be used. Such as "start" or "stop", for example. There is still more work to do as this change doesn't fix the Exit in terms of dependency handling. Currently, the process structure does not distinguish the Rule action, such as "start" or "stop". Additional changes to the process structure are needed. --- level_3/controller/c/private-common.h | 38 +++++- level_3/controller/c/private-controller.c | 10 +- level_3/controller/c/private-controller.h | 4 +- level_3/controller/c/private-entry.c | 136 +++++++++++++++++++-- level_3/controller/c/private-entry.h | 28 +++++ level_3/controller/c/private-rule.c | 43 ++++++- level_3/controller/c/private-rule.h | 10 +- level_3/controller/c/private-thread.c | 6 +- .../controller/data/settings/entries/default.entry | 22 ++-- .../example/entries/asynchronous-serial.entry | 12 +- .../settings/example/entries/asynchronous.entry | 14 +-- .../example/entries/serial-alternate.entry | 12 +- .../data/settings/example/entries/serial.entry | 2 +- .../data/settings/example/entries/sshd.entry | 8 +- .../data/settings/example/entries/test.entry | 16 +-- .../data/settings/example/entries/utility.entry | 10 +- .../data/settings/example/exits/serial.exit | 2 +- .../data/settings/example/exits/sshd.exit | 4 +- .../rules/maintenance/{explode.rule => boom.rule} | 0 .../data/settings/example/rules/service/sshd.rule | 1 - level_3/controller/documents/entry.txt | 64 +++++++--- level_3/controller/documents/exit.txt | 74 ++++++++--- level_3/controller/documents/rule.txt | 30 ++--- level_3/controller/specifications/entry.txt | 58 ++++++++- level_3/controller/specifications/exit.txt | 58 ++++++++- level_3/controller/specifications/rule.txt | 6 + 26 files changed, 534 insertions(+), 134 deletions(-) rename level_3/controller/data/settings/example/rules/maintenance/{explode.rule => boom.rule} (100%) diff --git a/level_3/controller/c/private-common.h b/level_3/controller/c/private-common.h index 34d0d22..2b7bb51 100644 --- a/level_3/controller/c/private-common.h +++ b/level_3/controller/c/private-common.h @@ -895,7 +895,33 @@ extern "C" { #endif // _di_controller_processs_t_ /** - * An Entry Item Action + * An Entry Item Action. + * + * controller_entry_action_type_*: + * - consider: Designate a rule to be pre-loaded. + * - failsafe: Designate a failsafe "item". + * - freeze: A Rule Action for freezing. + * - item: A named set of Rules. + * - kill: A Rule Action for killing. + * - pause: A Rule Action for pausing. + * - ready: Designate readiness for special processing for Entry or Exit. + * - reload: A Rule Action for reloading. + * - restart: A Rule Action for restarting. + * - resume: A Rule Action for resuming. + * - start: A Rule Action for starting. + * - stop: A Rule Action for stopping. + * - timeout: Inline timeout settings. + * - thaw: A Rule Action for unfreezing. + * + * controller_entry_rule_code_*: + * - asynchronous: Process Rule asynchronously. + * - require: Require Rule operations to succeed or the Entry/Exit will fail. + * - wait: Wait for all existing asynchronous processes to finish before operating Rule. + * + * controller_entry_timeout_code_*: + * - kill: Designate time to wait before killing. + * - start: Designate time to wait before starting. + * - stop: Designate time to wait before stopping. * * type: The type of Action. * code: A single code or sub-type associated with the Action. @@ -908,10 +934,18 @@ extern "C" { enum { controller_entry_action_type_consider = 1, controller_entry_action_type_failsafe, + controller_entry_action_type_freeze, controller_entry_action_type_item, + controller_entry_action_type_kill, + controller_entry_action_type_pause, controller_entry_action_type_ready, - controller_entry_action_type_rule, + controller_entry_action_type_reload, + controller_entry_action_type_restart, + controller_entry_action_type_resume, + controller_entry_action_type_start, + controller_entry_action_type_stop, controller_entry_action_type_timeout, + controller_entry_action_type_thaw, }; #define controller_entry_rule_code_asynchronous 0x1 diff --git a/level_3/controller/c/private-controller.c b/level_3/controller/c/private-controller.c index e8a6863..6cfad59 100644 --- a/level_3/controller/c/private-controller.c +++ b/level_3/controller/c/private-controller.c @@ -688,7 +688,7 @@ extern "C" { #endif // _di_controller_preprocess_entry_ #ifndef _di_controller_process_entry_ - f_status_t controller_process_entry(const bool failsafe, const bool is_entry, const uint8_t action, controller_main_t *main, controller_cache_t *cache) { + f_status_t controller_process_entry(const bool failsafe, const bool is_entry, controller_main_t *main, controller_cache_t *cache) { f_status_t status = F_none; f_status_t status_lock = F_none; @@ -782,7 +782,7 @@ extern "C" { } if (F_status_is_error(entry_action->status)) { - if (entry_action->type == controller_entry_action_type_rule) { + if (controller_entry_action_type_is_rule(entry_action->type)) { if (simulate) { if (main->data->error.verbosity != f_console_verbosity_quiet) { f_thread_mutex_lock(&main->thread->lock.print); @@ -1020,7 +1020,7 @@ extern "C" { // exit inner loop to force restarting and start processing the requested item. break; } - else if (entry_action->type == controller_entry_action_type_consider || entry_action->type == controller_entry_action_type_rule) { + else if (entry_action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(entry_action->type)) { status_lock = controller_lock_write(is_entry, main->thread, &main->thread->lock.rule); @@ -1066,7 +1066,7 @@ extern "C" { f_thread_mutex_lock(&main->thread->lock.print); fprintf(main->data->output.stream, "%c", f_string_eol_s[0]); - fprintf(main->data->output.stream, "%s entry item rule '", entry_action->type == controller_entry_action_type_rule ? "Processing" : "Considering"); + fprintf(main->data->output.stream, "%s entry item rule '", entry_action->type == controller_entry_action_type_consider ? "Considering" : "Processing"); fprintf(main->data->output.stream, "%s%s%s", main->data->context.set.title.before->string, alias_rule.string, main->data->context.set.title.after->string); fprintf(main->data->output.stream, "'.%c", f_string_eol_s[0]); @@ -1242,7 +1242,7 @@ extern "C" { } } - status = controller_rule_process_begin(options_force, alias_rule, is_entry ? controller_rule_action_type_start : controller_rule_action_type_stop, options_process, is_entry ? controller_process_type_entry : controller_process_type_exit, stack, *main, *cache); + status = controller_rule_process_begin(options_force, alias_rule, controller_entry_action_type_to_rule_action_type(entry_action->type), options_process, is_entry ? controller_process_type_entry : controller_process_type_exit, stack, *main, *cache); if (F_status_set_fine(status) == F_memory_not || status == F_child || status == F_signal || !controller_thread_is_enabled(is_entry, main->thread)) { break; diff --git a/level_3/controller/c/private-controller.h b/level_3/controller/c/private-controller.h index 66e59af..5d13d64 100644 --- a/level_3/controller/c/private-controller.h +++ b/level_3/controller/c/private-controller.h @@ -335,8 +335,6 @@ extern "C" { * @param is_entry * If TRUE, then this operate as an entry. * If FALSE, then this operate as an exit. - * @param action - * The action to perform, should be either controller_rule_action_type_start (for entry) or controller_rule_action_type_stop (for exit). * @param main * The main data. * @param cache @@ -357,7 +355,7 @@ extern "C" { * @see controller_string_dynamic_append_terminated() */ #ifndef _di_controller_process_entry_ - extern f_status_t controller_process_entry(const bool failsafe, const bool is_entry, const uint8_t action, controller_main_t *main, controller_cache_t *cache) f_gcc_attribute_visibility_internal; + extern f_status_t controller_process_entry(const bool failsafe, const bool is_entry, controller_main_t *main, controller_cache_t *cache) f_gcc_attribute_visibility_internal; #endif // _di_controller_process_entry_ /** diff --git a/level_3/controller/c/private-entry.c b/level_3/controller/c/private-entry.c index 066b9ab..bc636b5 100644 --- a/level_3/controller/c/private-entry.c +++ b/level_3/controller/c/private-entry.c @@ -26,6 +26,26 @@ extern "C" { } #endif // _di_controller_entry_action_parameters_print_ +#ifndef _di_controller_entry_action_type_is_rule_ + f_status_t controller_entry_action_type_is_rule(uint8_t type) { + + switch (type) { + case controller_entry_action_type_freeze: + case controller_entry_action_type_kill: + case controller_entry_action_type_pause: + case controller_entry_action_type_reload: + case controller_entry_action_type_restart: + case controller_entry_action_type_resume: + case controller_entry_action_type_start: + case controller_entry_action_type_stop: + case controller_entry_action_type_thaw: + return F_true; + } + + return F_false; + } +#endif // _di_controller_entry_action_type_is_rule_ + #ifndef _di_controller_entry_action_type_name_ f_string_static_t controller_entry_action_type_name(const uint8_t type) { @@ -42,19 +62,59 @@ extern "C" { buffer.used = controller_string_failsafe_length; break; + case controller_entry_action_type_freeze: + buffer.string = controller_string_freeze_s; + buffer.used = controller_string_freeze_length; + break; + case controller_entry_action_type_item: buffer.string = controller_string_item_s; buffer.used = controller_string_item_length; break; + case controller_entry_action_type_kill: + buffer.string = controller_string_kill_s; + buffer.used = controller_string_kill_length; + break; + + case controller_entry_action_type_pause: + buffer.string = controller_string_pause_s; + buffer.used = controller_string_pause_length; + break; + case controller_entry_action_type_ready: buffer.string = controller_string_ready_s; buffer.used = controller_string_ready_length; break; - case controller_entry_action_type_rule: - buffer.string = controller_string_rule_s; - buffer.used = controller_string_rule_length; + case controller_entry_action_type_reload: + buffer.string = controller_string_reload_s; + buffer.used = controller_string_reload_length; + break; + + case controller_entry_action_type_restart: + buffer.string = controller_string_restart_s; + buffer.used = controller_string_restart_length; + break; + + case controller_entry_action_type_resume: + buffer.string = controller_string_resume_s; + buffer.used = controller_string_resume_length; + break; + + case controller_entry_action_type_start: + buffer.string = controller_string_start_s; + buffer.used = controller_string_start_length; + break; + + case controller_entry_action_type_stop: + buffer.string = controller_string_stop_s; + buffer.used = controller_string_stop_length; + break; + + case controller_entry_action_type_thaw: + buffer.string = controller_string_thaw_s; + buffer.used = controller_string_thaw_length; break; case controller_entry_action_type_timeout: @@ -69,6 +129,42 @@ extern "C" { } #endif // _di_controller_entry_action_type_name_ +#ifndef _di_controller_entry_action_type_to_rule_action_type_ + uint8_t controller_entry_action_type_to_rule_action_type(uint8_t type) { + + switch (type) { + case controller_entry_action_type_freeze: + return controller_rule_action_type_freeze; + + case controller_entry_action_type_kill: + return controller_rule_action_type_kill; + + case controller_entry_action_type_pause: + return controller_rule_action_type_pause; + + case controller_entry_action_type_reload: + return controller_rule_action_type_reload; + + case controller_entry_action_type_restart: + return controller_rule_action_type_restart; + + case controller_entry_action_type_resume: + return controller_rule_action_type_resume; + + case controller_entry_action_type_start: + return controller_rule_action_type_start; + + case controller_entry_action_type_stop: + return controller_rule_action_type_stop; + + case controller_entry_action_type_thaw: + return controller_rule_action_type_thaw; + } + + return 0; + } +#endif // _di_controller_entry_action_type_to_rule_action_type_ + #ifndef _di_controller_entry_actions_increase_by_ f_status_t controller_entry_actions_increase_by(const f_array_length_t amount, controller_entry_actions_t *actions) { @@ -186,14 +282,38 @@ extern "C" { else if (fl_string_dynamic_compare_string(controller_string_failsafe_s, cache->action.name_action, controller_string_failsafe_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_failsafe; } + else if (fl_string_dynamic_compare_string(controller_string_freeze_s, cache->action.name_action, controller_string_freeze_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_freeze; + } else if (fl_string_dynamic_compare_string(controller_string_item_s, cache->action.name_action, controller_string_item_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_item; } + else if (fl_string_dynamic_compare_string(controller_string_kill_s, cache->action.name_action, controller_string_kill_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_kill; + } + else if (fl_string_dynamic_compare_string(controller_string_pause_s, cache->action.name_action, controller_string_pause_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_pause; + } else if (fl_string_dynamic_compare_string(controller_string_ready_s, cache->action.name_action, controller_string_ready_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_ready; } - else if (fl_string_dynamic_compare_string(controller_string_rule_s, cache->action.name_action, controller_string_rule_length) == F_equal_to) { - actions->array[actions->used].type = controller_entry_action_type_rule; + else if (fl_string_dynamic_compare_string(controller_string_reload_s, cache->action.name_action, controller_string_reload_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_reload; + } + else if (fl_string_dynamic_compare_string(controller_string_restart_s, cache->action.name_action, controller_string_restart_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_restart; + } + else if (fl_string_dynamic_compare_string(controller_string_resume_s, cache->action.name_action, controller_string_resume_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_resume; + } + else if (fl_string_dynamic_compare_string(controller_string_start_s, cache->action.name_action, controller_string_start_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_start; + } + else if (fl_string_dynamic_compare_string(controller_string_stop_s, cache->action.name_action, controller_string_stop_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_stop; + } + else if (fl_string_dynamic_compare_string(controller_string_thaw_s, cache->action.name_action, controller_string_thaw_length) == F_equal_to) { + actions->array[actions->used].type = controller_entry_action_type_thaw; } else if (fl_string_dynamic_compare_string(controller_string_timeout_s, cache->action.name_action, controller_string_timeout_length) == F_equal_to) { actions->array[actions->used].type = controller_entry_action_type_timeout; @@ -212,7 +332,7 @@ extern "C" { continue; } - if (action->type == controller_entry_action_type_consider || action->type == controller_entry_action_type_rule) { + if (action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(action->type)) { allocate = cache->content_actions.array[i].used; at_least = 2; at_most = allocate; @@ -248,7 +368,7 @@ extern "C" { fprintf(main.data->error.to.stream, "%s%s%llu%s", main.data->error.context.after->string, main.data->error.notable.before->string, at_least, main.data->error.notable.after->string); - if (action->type == controller_entry_action_type_consider || action->type == controller_entry_action_type_rule) { + if (action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(action->type)) { fprintf(main.data->error.to.stream, "%s or more parameters.%s%c", main.data->error.context.before->string, main.data->error.context.after->string, f_string_eol_s[0]); } else { @@ -312,7 +432,7 @@ extern "C" { } // for if (F_status_is_error_not(action->status)) { - if (action->type == controller_entry_action_type_consider || action->type == controller_entry_action_type_rule) { + if (action->type == controller_entry_action_type_consider || controller_entry_action_type_is_rule(action->type)) { if (action->parameters.array[0].used) { // force the path to be canonical (removing all '../' parts). diff --git a/level_3/controller/c/private-entry.h b/level_3/controller/c/private-entry.h index e791b6c..059c6fb 100644 --- a/level_3/controller/c/private-entry.h +++ b/level_3/controller/c/private-entry.h @@ -25,6 +25,20 @@ extern "C" { #endif // _di_controller_entry_action_parameters_print_ /** + * Determine if the type code represents a Rule type. + * + * @param type + * The type code to compare against. + * + * @return + * TRUE if Rule type. + * FALSE otherwise. + */ +#ifndef _di_controller_entry_action_type_is_rule_ + extern f_status_t controller_entry_action_type_is_rule(uint8_t type) f_gcc_attribute_visibility_internal; +#endif // _di_controller_entry_action_type_is_rule_ + +/** * Get a string representing the entry action type. * * @param type @@ -39,6 +53,20 @@ extern "C" { #endif // _di_controller_entry_action_type_name_ /** + * Convert the Entry Action type to Rule Action type. + * + * @param type + * The Entry Action type. + * + * @return + * TRUE if Rule type. + * FALSE otherwise. + */ +#ifndef _di_controller_entry_action_type_to_rule_action_type_ + extern uint8_t controller_entry_action_type_to_rule_action_type(uint8_t type) f_gcc_attribute_visibility_internal; +#endif // _di_controller_entry_action_type_to_rule_action_type_ + +/** * Increase the size of the entry item actions array by the specified amount, but only if necessary. * * This only increases size if the current used plus amount is greater than the currently allocated size. diff --git a/level_3/controller/c/private-rule.c b/level_3/controller/c/private-rule.c index 97e75cd..b1ee47b 100644 --- a/level_3/controller/c/private-rule.c +++ b/level_3/controller/c/private-rule.c @@ -1794,7 +1794,6 @@ extern "C" { break; default: - if (main.data->error.verbosity != f_console_verbosity_quiet) { f_thread_mutex_lock(&main.thread->lock.print); @@ -1890,7 +1889,7 @@ extern "C" { // i==0 is need, i==1 is want, i==2 is wish. // loop through all dependencies: wait for depedency, execute dependency, fail due to missing required dependency, or skip unrequired missing dependencies. - for (i = 0; i < 3 && controller_thread_is_enabled_process(process, main.thread); ++i) { + for (; i < 3 && controller_thread_is_enabled_process(process, main.thread); ++i) { for (j = 0; j < dynamics[i]->used && controller_thread_is_enabled_process(process, main.thread); ++j) { @@ -2466,7 +2465,7 @@ extern "C" { f_thread_unlock(&process->lock); if (F_status_is_error_not(status)) { - if (options_force & controller_process_option_asynchronous) { + if (process->action && (options_force & controller_process_option_asynchronous)) { status = f_thread_create(0, &process->id_thread, controller_thread_process, (void *) process); if (F_status_is_error(status)) { @@ -2484,6 +2483,27 @@ extern "C" { } } + if (!action || F_status_is_error(status) && (process->state == controller_process_state_active || process->state == controller_process_state_busy)) { + status = controller_lock_write_process(process, main.thread, &process->lock); + + if (status == F_signal || F_status_is_error(status)) { + controller_lock_error_critical_print(main.data->error, F_status_set_fine(status), F_false, main.thread); + + f_thread_unlock(&process->active); + + return status; + } + + if (!action || (options_force & controller_process_option_asynchronous)) { + process->state = controller_process_state_done; + } + else { + process->state = controller_process_state_idle; + } + + f_thread_unlock(&process->lock); + } + f_thread_unlock(&process->active); if (F_status_is_error(status)) { @@ -2586,6 +2606,17 @@ extern "C" { if (F_status_is_error(status)) { controller_entry_error_print(main.data->error, process->cache.action, F_status_set_fine(status), "controller_rule_copy", F_true, main.thread); } + else if (!process->action) { + + // this is a "consider" Action, so do not actually execute the rule. + f_thread_unlock(&process->lock); + + if (options_force & controller_process_option_asynchronous) { + f_thread_unlock(&process->active); + } + + return F_process_not; + } else { for (f_array_length_t i = 0; i < process->stack.used && controller_thread_is_enabled_process(process, main.thread); ++i) { @@ -4820,11 +4851,15 @@ extern "C" { f_thread_mutex_lock(&main.thread->lock.print); switch (action) { + case controller_rule_action_type_freeze: case controller_rule_action_type_kill: + case controller_rule_action_type_pause: case controller_rule_action_type_reload: case controller_rule_action_type_restart: + case controller_rule_action_type_resume: case controller_rule_action_type_start: case controller_rule_action_type_stop: + case controller_rule_action_type_thaw: break; default: @@ -4854,7 +4889,7 @@ extern "C" { for (j = 0; j < rule.items.array[i].actions.used; ++j) { - if (rule.items.array[i].actions.array[j].type == action) { + if (!action || rule.items.array[i].actions.array[j].type == action) { missing = F_false; break; } diff --git a/level_3/controller/c/private-rule.h b/level_3/controller/c/private-rule.h index 52cb8e3..b1f2c82 100644 --- a/level_3/controller/c/private-rule.h +++ b/level_3/controller/c/private-rule.h @@ -671,7 +671,8 @@ extern "C" { * * @return * F_none on success. - * F_found on success and the process was found to already be running (nothing to do). + * F_found on the process was found to already be running (nothing to do). + * F_process_not if the process was not executed because it is a "consider" Action. * F_signal on (exit) signal received. * * F_found_not (with error bit) if unable to for a process for the given rule id. @@ -777,13 +778,6 @@ extern "C" { * The rule to process. * @param action * The action to perform based on the action type codes. - * - * Only subset of the action type codes are supported: - * - controller_rule_action_type_kill - * - controller_rule_action_type_reload - * - controller_rule_action_type_restart - * - controller_rule_action_type_start - * - controller_rule_action_type_stop * @param options * A number using bits to represent specific boolean options. * If no bits set, then operate normally in a synchronous manner. diff --git a/level_3/controller/c/private-thread.c b/level_3/controller/c/private-thread.c index bbf273b..cd1f373 100644 --- a/level_3/controller/c/private-thread.c +++ b/level_3/controller/c/private-thread.c @@ -646,13 +646,13 @@ extern "C" { *status = F_status_set_error(F_available_not); } else { - *status = controller_process_entry(F_false, F_true, controller_rule_action_type_start, entry->main, cache); + *status = controller_process_entry(F_false, F_true, entry->main, cache); if (F_status_is_error(*status)) { entry->setting->ready = controller_setting_ready_fail; if (F_status_set_fine(*status) == F_require && entry->main->setting->failsafe_enabled) { - const f_status_t status_failsafe = controller_process_entry(F_true, F_true, controller_rule_action_type_start, entry->main, cache); + const f_status_t status_failsafe = controller_process_entry(F_true, F_true, entry->main, cache); if (F_status_is_error(status_failsafe)) { if (data->error.verbosity != f_console_verbosity_quiet) { @@ -723,7 +723,7 @@ extern "C" { if (F_status_is_error_not(*status) && *status != F_signal && *status != F_child && *status != F_file_found_not) { if (data->parameters[controller_parameter_validate].result == f_console_result_none || data->parameters[controller_parameter_test].result == f_console_result_found) { - *status = controller_process_entry(F_false, F_false, controller_rule_action_type_stop, entry->main, cache); + *status = controller_process_entry(F_false, F_false, entry->main, cache); if (F_status_is_error(*status)) { entry->setting->ready = controller_setting_ready_fail; diff --git a/level_3/controller/data/settings/entries/default.entry b/level_3/controller/data/settings/entries/default.entry index d6770a2..231023a 100644 --- a/level_3/controller/data/settings/entries/default.entry +++ b/level_3/controller/data/settings/entries/default.entry @@ -17,31 +17,31 @@ main: item console boot: - rule boot filesystem require - rule boot modules require - rule boot devices require + start boot filesystem require + start boot modules require + start boot devices require - rule service logger wait - rule service dbus asynchronous + start service logger wait + start service dbus asynchronous ready net: - rule net all asynchronous + start net all asynchronous time: - rule task clock asynchronous + start task clock asynchronous keyboard: - rule task keyboard asynchronous + start task keyboard asynchronous console: - rule program terminal require wait - rule service mouse + start program terminal require wait + start service mouse maintenance: timeout start 2 timeout stop 2 timeout kill 2 - rule maintenance console + start maintenance console diff --git a/level_3/controller/data/settings/example/entries/asynchronous-serial.entry b/level_3/controller/data/settings/example/entries/asynchronous-serial.entry index 96c7206..b6b736f 100644 --- a/level_3/controller/data/settings/example/entries/asynchronous-serial.entry +++ b/level_3/controller/data/settings/example/entries/asynchronous-serial.entry @@ -1,11 +1,11 @@ # fss-0005 main: - rule serial s_1 asynchronous - rule serial s_2 asynchronous - rule serial s_3 asynchronous - rule serial s_4 asynchronous - rule serial s_5 asynchronous - rule serial s_6 asynchronous + start serial s_1 asynchronous + start serial s_2 asynchronous + start serial s_3 asynchronous + start serial s_4 asynchronous + start serial s_5 asynchronous + start serial s_6 asynchronous ready wait diff --git a/level_3/controller/data/settings/example/entries/asynchronous.entry b/level_3/controller/data/settings/example/entries/asynchronous.entry index fa05f54..5314a4f 100644 --- a/level_3/controller/data/settings/example/entries/asynchronous.entry +++ b/level_3/controller/data/settings/example/entries/asynchronous.entry @@ -1,7 +1,7 @@ # fss-0005 setting: - mode program + mode program main: ready @@ -9,9 +9,9 @@ main: consider asynchronous sleep_8 asynchronous consider asynchronous sleep_10 asynchronous - rule asynchronous sleep_1 asynchronous - rule asynchronous sleep_2 asynchronous - rule asynchronous sleep_3 asynchronous - rule asynchronous sleep_5 asynchronous - rule asynchronous sleep_8 asynchronous - rule asynchronous sleep_10 asynchronous + start asynchronous sleep_1 asynchronous + start asynchronous sleep_2 asynchronous + start asynchronous sleep_3 asynchronous + start asynchronous sleep_5 asynchronous + start asynchronous sleep_8 asynchronous + start asynchronous sleep_10 asynchronous diff --git a/level_3/controller/data/settings/example/entries/serial-alternate.entry b/level_3/controller/data/settings/example/entries/serial-alternate.entry index 2a79f5a..9482bfc 100644 --- a/level_3/controller/data/settings/example/entries/serial-alternate.entry +++ b/level_3/controller/data/settings/example/entries/serial-alternate.entry @@ -4,11 +4,11 @@ setting: mode program main: - rule serial s_1 - rule serial s_2 - rule serial s_3 - rule serial s_4 - rule serial s_5 - rule serial s_6 + start serial s_1 + start serial s_2 + start serial s_3 + start serial s_4 + start serial s_5 + start serial s_6 ready diff --git a/level_3/controller/data/settings/example/entries/serial.entry b/level_3/controller/data/settings/example/entries/serial.entry index 8d6ee33..a63fe05 100644 --- a/level_3/controller/data/settings/example/entries/serial.entry +++ b/level_3/controller/data/settings/example/entries/serial.entry @@ -7,6 +7,6 @@ main: consider serial s_4 consider serial s_5 - rule serial s_6 + start serial s_6 ready diff --git a/level_3/controller/data/settings/example/entries/sshd.entry b/level_3/controller/data/settings/example/entries/sshd.entry index 73a5a09..a74cc8d 100644 --- a/level_3/controller/data/settings/example/entries/sshd.entry +++ b/level_3/controller/data/settings/example/entries/sshd.entry @@ -5,9 +5,9 @@ main: timeout stop 7 timeout kill 3 - failsafe boom + failsafe explode - rule service sshd + start service sshd -boom: - rule maintenance explode +explode: + start maintenance boom diff --git a/level_3/controller/data/settings/example/entries/test.entry b/level_3/controller/data/settings/example/entries/test.entry index 6576bd6..b68db93 100644 --- a/level_3/controller/data/settings/example/entries/test.entry +++ b/level_3/controller/data/settings/example/entries/test.entry @@ -5,7 +5,7 @@ main: timeout stop 7 timeout kill 3 - failsafe boom + failsafe explode item first item last @@ -13,15 +13,15 @@ main: first: consider script require_me - rule script succeed - rule script php - rule command multiple + start script succeed + start script php + start command multiple # uncomment python to see it fail. - #rule script python + #start script python last: - rule script fail require wait + start script fail require wait -boom: - rule maintenance explode +explode: + start maintenance boom diff --git a/level_3/controller/data/settings/example/entries/utility.entry b/level_3/controller/data/settings/example/entries/utility.entry index b25a3b0..2f7fda2 100644 --- a/level_3/controller/data/settings/example/entries/utility.entry +++ b/level_3/controller/data/settings/example/entries/utility.entry @@ -5,10 +5,10 @@ main: timeout stop 7 timeout kill 3 - failsafe boom + failsafe explode - rule utility sleeper_1 - rule utility sleeper_2 + start utility sleeper_1 + start utility sleeper_2 -boom: - rule maintenance explode +explode: + start maintenance boom diff --git a/level_3/controller/data/settings/example/exits/serial.exit b/level_3/controller/data/settings/example/exits/serial.exit index 8d6ee33..0df6abd 100644 --- a/level_3/controller/data/settings/example/exits/serial.exit +++ b/level_3/controller/data/settings/example/exits/serial.exit @@ -7,6 +7,6 @@ main: consider serial s_4 consider serial s_5 - rule serial s_6 + stop serial s_6 ready diff --git a/level_3/controller/data/settings/example/exits/sshd.exit b/level_3/controller/data/settings/example/exits/sshd.exit index 73a5a09..79e738a 100644 --- a/level_3/controller/data/settings/example/exits/sshd.exit +++ b/level_3/controller/data/settings/example/exits/sshd.exit @@ -7,7 +7,7 @@ main: failsafe boom - rule service sshd + stop service sshd boom: - rule maintenance explode + stop maintenance explode diff --git a/level_3/controller/data/settings/example/rules/maintenance/explode.rule b/level_3/controller/data/settings/example/rules/maintenance/boom.rule similarity index 100% rename from level_3/controller/data/settings/example/rules/maintenance/explode.rule rename to level_3/controller/data/settings/example/rules/maintenance/boom.rule diff --git a/level_3/controller/data/settings/example/rules/service/sshd.rule b/level_3/controller/data/settings/example/rules/service/sshd.rule index 4c3d4d6..5a5f3b6 100644 --- a/level_3/controller/data/settings/example/rules/service/sshd.rule +++ b/level_3/controller/data/settings/example/rules/service/sshd.rule @@ -12,4 +12,3 @@ service: pid_file /var/run/sshd.pid with full_path start sshd - #stop diff --git a/level_3/controller/documents/entry.txt b/level_3/controller/documents/entry.txt index e905890..66c3f03 100644 --- a/level_3/controller/documents/entry.txt +++ b/level_3/controller/documents/entry.txt @@ -19,7 +19,8 @@ Entry Documentation: The "service" mode (the default mode) designates that the Entry operates as a service and will sit and wait for control commands when complete. The "service" mode will call the "exit" with the same name as this Entry, but with the extension "exit", such as "default.exit". - Each item supports the following Action Names: "consider", "failsafe", "item", "ready", "rule", and "timeout". + Each item supports the following Action Names: "consider", "failsafe", "freeze", "item", "kill", "pause", "reload", "restart", "ready", "resume", "start", "stop", and "timeout". + Of those types, the following are considered a "rule" Action: "freeze", "kill", "pause", "reload", "restart", "resume", "start", and "stop". The "consider" Action is a special case of a "rule" Action. All Action Parameters are the same as with the "rule" Action Parameters. @@ -32,9 +33,29 @@ Entry Documentation: Each successive "failsafe" Action specified replaces the previously defined "failsafe" Action (in a top-down manner). When operating in "failsafe", the "require" Action is ignored given that it is meaningless once operating in failsafe. + The "freeze" is a "rule" Action for freezing some Control Group. + This "rule" Action will process the "freeze" inner Content of the named Rule. + This is specific to Control Groups and is not yet fully implemented. + Once implemented this documentation will need to be updated and clarified. + The "item" Action accepts only a valid Item Name in which will be immediately executed. Any valid Item Name, except for the reserved "main", may be used. + The "kill" is a "rule" Action for forcibly terminating some process. + This "rule" Action will process the "kill" inner Content of the named Rule. + + The "pause" is a "rule" Action for pausing some process. + This "rule" Action will process the "pause" inner Content of the named Rule. + + The "reload" is a "rule" Action for pausing some process. + This "rule" Action will process the "reload" inner Content of the named Rule. + + The "restart" is a "rule" Action for pausing some process. + This "rule" Action will process the "restart" inner Content of the named Rule. + + The "resume" is a "rule" Action for pausing some process. + This "rule" Action will process the "resume" inner Content of the named Rule. + The "ready" Action instructs the controller program when it is safe to perform normal tasks, such as creating the pid file. When not specified, the state is always assumed to be ready. For example, the controller program may be used as a full blown "init" replacement and therefore may need to mount the /var/run/ directory. @@ -43,7 +64,32 @@ Entry Documentation: Adding "ready" essentially specifies a point in time in the Entry in which things are expected to be safe for such basic operations. When the optional "wait" is provided, then "ready" will wait for all currently started asynchronous processes to complete before operating. - The "rule" Action immediately executes a named rule file. + The "start" is a "rule" Action for pausing some process. + This "rule" Action will process the "start" inner Content of the named Rule. + + The "stop" is a "rule" Action for pausing some process. + This "rule" Action will process the "stop" inner Content of the named Rule. + + The "thaw" is a "rule" Action for unfreezing some Control Group. + This "rule" Action will process the "thaw" inner Content of the named Rule. + This is specific to Control Groups and is not yet fully implemented. + Once implemented this documentation will need to be updated and clarified. + + The "timeout" Action provides default global settings for each of the three special situations: "start", "stop", and "kill". + Each of these may only have a single one exist at a time (one "start", one "stop", and one "kill"). + Each successive "timeout" Action, specific to each Action Name (such as "start"), specified replaces the previously defined "timeout" Action (in a top-down manner). + Each of these accepts a single Action Parameter that is a 0 or greater whole number representing the number of MegaTime (MT) (equivalent to milliseconds). + For "start", this represents the number of MegaTime to wait after starting some rule before assuming something went wrong and the rule is returned as failed. + For "stop", this represents the number of MegaTime to wait after stopping some rule before assuming something went wrong and the rule is returned as failed. + For "kill", this represents the number of MegaTime to wait after stopping some rule and that rule has not yet stopped to forcefully stop the rule (aka kill the rule). + The timeouts are generally only valid for services such as daemon services. + A value of 0 disables this (prevents any action). + +Entry Rule Documentation: + There are multiple Entry Actions that are considered "rule" Actions. + These are: "freeze", "kill", "pause", "reload", "restart", "resume", "start", and "stop". + + The "rule" Actions immediately execute a named rule file. The first Action Parameter represents the rule directory, which is a relative directory path the rule file is to be found. - Do not include leading or trailing slashes. - This is relative to the settings rules directory. @@ -59,16 +105,4 @@ Entry Documentation: It is important to note that for any given "rule", execution within that "rule" may be internally asynchronous (even if the "rule" is synchronous). For example, a service that is often called a daemon will execute in the background. Until that execution succeeds and the daemon goes into the background the representing rule will block. - After the daemon goes into the background, then the representing rule will be fully executed. - - Any "rule" specified in this Entry file is always executed using the "start" rule action type. - - The "timeout" Action provides default global settings for each of the three special situations: "start", "stop", and "kill". - Each of these may only have a single one exist at a time (one "start", one "stop", and one "kill"). - Each successive "timeout" Action, specific to each Action Name (such as "start"), specified replaces the previously defined "timeout" Action (in a top-down manner). - Each of these accepts a single Action Parameter that is a 0 or greater whole number representing the number of MegaTime (MT) (equivalent to milliseconds). - For "start", this represents the number of MegaTime to wait after starting some rule before assuming something went wrong and the rule is returned as failed. - For "stop", this represents the number of MegaTime to wait after stopping some rule before assuming something went wrong and the rule is returned as failed. - For "kill", this represents the number of MegaTime to wait after stopping some rule and that rule has not yet stopped to forcefully stop the rule (aka kill the rule). - The timeouts are generally only valid for services such as daemon services. - A value of 0 disables this (prevents any action). + After the daemon goes into the background, then the representing rule will no longer block and be fully executed. diff --git a/level_3/controller/documents/exit.txt b/level_3/controller/documents/exit.txt index 0389f4e..d04ecf8 100644 --- a/level_3/controller/documents/exit.txt +++ b/level_3/controller/documents/exit.txt @@ -14,7 +14,8 @@ Exit Documentation: A number of settings are supported, but if this Item Object is not specified, then defaults are used. There are no settings are available. - Each item supports the following Action Names: "consider", "failsafe", "item", "ready", "rule", and "timeout". + Each item supports the following Action Names: "consider", "failsafe", "freeze", "item", "kill", "pause", "reload", "restart", "ready", "resume", "start", "stop", and "timeout". + Of those types, the following are considered a "rule" Action: "freeze", "kill", "pause", "reload", "restart", "resume", "start", and "stop". The "consider" Action is a special case of a "rule" Action. All Action Parameters are the same as with the "rule" Action Parameters. @@ -27,14 +28,63 @@ Exit Documentation: Each successive "failsafe" Action specified replaces the previously defined "failsafe" Action (in a top-down manner). When operating in "failsafe", the "require" Action is ignored given that it is meaningless once operating in failsafe. + The "freeze" is a "rule" Action for freezing some Control Group. + This "rule" Action will process the "freeze" inner Content of the named Rule. + This is specific to Control Groups and is not yet fully implemented. + Once implemented this documentation will need to be updated and clarified. + The "item" Action accepts only a valid Item Name in which will be immediately executed. Any valid Item Name, except for the reserved "main", may be used. - The "ready" Action instructs the controller program when it is safe to perform stop tasks. - A stop task is simply informing all controlled processes to stop. - When not specified, the state is always assumed to be ready (all controlled processes are immediately informed to stop). + The "kill" is a "rule" Action for forcibly terminating some process. + This "rule" Action will process the "kill" inner Content of the named Rule. + + The "pause" is a "rule" Action for pausing some process. + This "rule" Action will process the "pause" inner Content of the named Rule. + + The "reload" is a "rule" Action for pausing some process. + This "rule" Action will process the "reload" inner Content of the named Rule. + + The "restart" is a "rule" Action for pausing some process. + This "rule" Action will process the "restart" inner Content of the named Rule. + + The "resume" is a "rule" Action for pausing some process. + This "rule" Action will process the "resume" inner Content of the named Rule. + + The "ready" Action instructs the controller program when it is safe to perform normal tasks, such as creating the pid file. + When not specified, the state is always assumed to be ready. + For example, the controller program may be used as a full blown "init" replacement and therefore may need to mount the /var/run/ directory. + If the pid file is created at program start, then the /var/run/controller.pid would be written before the /var/run/ directory is ready. + This could be a problem, such as on a read-only filesystem the pid creation fails and controller bails out on error. + Adding "ready" essentially specifies a point in time in the Entry in which things are expected to be safe for such basic operations. + When the optional "wait" is provided, then "ready" will wait for all currently started asynchronous processes to complete before operating. + + The "start" is a "rule" Action for pausing some process. + This "rule" Action will process the "start" inner Content of the named Rule. + + The "stop" is a "rule" Action for pausing some process. + This "rule" Action will process the "stop" inner Content of the named Rule. - The "rule" Action immediately executes a named rule file. + The "thaw" is a "rule" Action for unfreezing some Control Group. + This "rule" Action will process the "thaw" inner Content of the named Rule. + This is specific to Control Groups and is not yet fully implemented. + Once implemented this documentation will need to be updated and clarified. + + The "timeout" Action provides default global settings for each of the three special situations: "start", "stop", and "kill". + Each of these may only have a single one exist at a time (one "start", one "stop", and one "kill"). + Each successive "timeout" Action, specific to each Action Name (such as "start"), specified replaces the previously defined "timeout" Action (in a top-down manner). + Each of these accepts a single Action Parameter that is a 0 or greater whole number representing the number of MegaTime (MT) (equivalent to milliseconds). + For "start", this represents the number of MegaTime to wait after starting some rule before assuming something went wrong and the rule is returned as failed. + For "stop", this represents the number of MegaTime to wait after stopping some rule before assuming something went wrong and the rule is returned as failed. + For "kill", this represents the number of MegaTime to wait after stopping some rule and that rule has not yet stopped to forcefully stop the rule (aka kill the rule). + The timeouts are generally only valid for services such as daemon services. + A value of 0 disables this (prevents any action). + +Entry Rule Documentation: + There are multiple Entry Actions that are considered "rule" Actions. + These are: "freeze", "kill", "pause", "reload", "restart", "resume", "start", and "stop". + + The "rule" Actions immediately execute a named rule file. The first Action Parameter represents the rule directory, which is a relative directory path the rule file is to be found. - Do not include leading or trailing slashes. - This is relative to the settings rules directory. @@ -50,16 +100,4 @@ Exit Documentation: It is important to note that for any given "rule", execution within that "rule" may be internally asynchronous (even if the "rule" is synchronous). For example, a service that is often called a daemon will execute in the background. Until that execution succeeds and the daemon goes into the background the representing rule will block. - After the daemon goes into the background, then the representing rule will be fully executed. - - Any "rule" specified in this Exit file is always executed using the "stop" rule action type. - - The "timeout" Action provides default global settings for each of the three special situations: "start", "stop", and "kill". - Each of these may only have a single one exist at a time (one "start", one "stop", and one "kill"). - Each successive "timeout" Action, specific to each Action Name (such as "start"), specified replaces the previously defined "timeout" Action (in a top-down manner). - Each of these accepts a single Action Parameter that is a 0 or greater whole number representing the number of MegaTime (MT) (equivalent to milliseconds). - For "start", this represents the number of MegaTime to wait after starting some rule before assuming something went wrong and the rule is returned as failed. - For "stop", this represents the number of MegaTime to wait after stopping some rule before assuming something went wrong and the rule is returned as failed. - For "kill", this represents the number of MegaTime to wait after stopping some rule and that rule has not yet stopped to forcefully stop the rule (aka kill the rule). - The timeouts are generally only valid for services such as daemon services. - A value of 0 disables this (prevents any action). + After the daemon goes into the background, then the representing rule will no longer block and be fully executed. diff --git a/level_3/controller/documents/rule.txt b/level_3/controller/documents/rule.txt index 74f2366..a0e0013 100644 --- a/level_3/controller/documents/rule.txt +++ b/level_3/controller/documents/rule.txt @@ -72,23 +72,25 @@ Rule Documentation: The "utility" Rule Type provides a "script" accompanied with a PID file (Process Identifier file). - There are seven primary inner Content to perform: "kill", "pause", "restart", "resume", "reload", "start", and "stop". - - The "kill" Content is performed whenever this rule is executed using the kill action (which is, in general, a forced stop). - The "pause" Content is performed whenever this rule is executed using the pause action. - The "restart" Content is performed whenever this rule is executed using the restart action. - The "resume" Content is performed whenever this rule is executed using the resume action. - The "reload" Content is performed whenever this rule is executed using the reload action. - The "start" Content is performed whenever this rule is executed using the start action. - The "stop" Content is performed whenever this rule is executed using the stop action. - - When "restart" Content is not provided, then "start" and "stop" is called when the rule is executed using the restart action, if both "start" and "stop" are provided. - When "reload", "start", or "stop" Content are not provided, then no respective action is performed. + There are nine primary inner Content Objects to perform: "freeze", "kill", "pause", "restart", "resume", "reload", "start", "stop", "thaw". + + The "freeze" Object's Content is performed whenever this rule is executed using the freeze Action. + The "kill" Object's Content is performed whenever this rule is executed using the kill Action (which is, in general, a forced stop). + The "pause" Object's Content is performed whenever this rule is executed using the pause Action. + The "restart" Object's Content is performed whenever this rule is executed using the restart Action. + The "resume" Object's Content is performed whenever this rule is executed using the resume Action. + The "reload" Object's Content is performed whenever this rule is executed using the reload Action. + The "start" Object's Content is performed whenever this rule is executed using the start Action. + The "stop" Object's Content is performed whenever this rule is executed using the stop Action. + The "thaw" Object's Content is performed whenever this rule is executed using the thaw Action. + + When "restart" Object's Content is not provided, then "start" and "stop" is called when the rule is executed using the restart Action, if both "start" and "stop" are provided. + When "reload", "start", or "stop" Object's Content are not provided, then no respective Action is performed. Commands are conditionally available depending on the presence of these, such as if "stop" is not provided then "stop" (and "restart") will not be available for the "control" program(s) to use. - The "pid_file" Content designates the path to the PID file created by the called program. + The "pid_file" Object's Content designates the path to the PID file created by the called program. - The "with" Content designates special flags designating very specific behavior to be applied to any single Rule Type. + The "with" Object's Content designates special flags designating very specific behavior to be applied to any single Rule Type. The following flags are supported: "full_path": Used only by Rule Types that execute something, wherein the entire full path is used for execution and is assigned as argument[0] (such as "/bin/bash"). When not specified, the path provided is used and the argument[0] will be the base name (such as "bash"). diff --git a/level_3/controller/specifications/entry.txt b/level_3/controller/specifications/entry.txt index a723d22..ce4ef2a 100644 --- a/level_3/controller/specifications/entry.txt +++ b/level_3/controller/specifications/entry.txt @@ -29,11 +29,67 @@ Entry Specification: - "require" - "wait" "failsafe": One Content that is a valid Object name, except for the reserved "main". + "freeze": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" "item": One Content that is a valid Object name, except for the reserved "main". + "kill": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "pause": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" "ready": Zero or One Content. The first may only be one of\: - "wait" - "rule": Two or more Content. + "reload": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "restart": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "resume": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "start": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "stop": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "thaw": Two or more Content. The first Content that is the relative directory path (without any leading/trailing slashes). The second Content that is the basename for a rule file. The third and beyond may only be one of\: diff --git a/level_3/controller/specifications/exit.txt b/level_3/controller/specifications/exit.txt index cb3bdad..a176197 100644 --- a/level_3/controller/specifications/exit.txt +++ b/level_3/controller/specifications/exit.txt @@ -28,11 +28,67 @@ Exit Specification: - "require" - "wait" "failsafe": One Content that is a valid Object name, except for the reserved "main". + "freeze": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" "item": One Content that is a valid Object name, except for the reserved "main". + "kill": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "pause": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" "ready": Zero or One Content. The first may only be one of\: - "wait" - "rule": Two or more Content. + "reload": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "restart": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "resume": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "start": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "stop": Two or more Content. + The first Content that is the relative directory path (without any leading/trailing slashes). + The second Content that is the basename for a rule file. + The third and beyond may only be one of\: + - "asynchronous" + - "require" + - "wait" + "thaw": Two or more Content. The first Content that is the relative directory path (without any leading/trailing slashes). The second Content that is the basename for a rule file. The third and beyond may only be one of\: diff --git a/level_3/controller/specifications/rule.txt b/level_3/controller/specifications/rule.txt index 61cf48a..375a0d7 100644 --- a/level_3/controller/specifications/rule.txt +++ b/level_3/controller/specifications/rule.txt @@ -48,6 +48,7 @@ Rule Specification: "wish": Two Content, the first being a partial path and the second being a rule file name without extension (such as "boot" "modules"). The "command" and "script" Rule Types allow the following the FSS-0001 (Extended)\: + "freeze": One or more Content representing a program being executed and its arguments. "kill": One or more Content representing a program being executed and its arguments. "pause": One or more Content representing a program being executed and its arguments. "reload": One or more Content representing a program being executed and its arguments. @@ -55,6 +56,7 @@ Rule Specification: "resume": One or more Content representing a program being executed and its arguments. "start": One or more Content representing a program being executed and its arguments. "stop": One or more Content representing a program being executed and its arguments. + "thaw": One or more Content representing a program being executed and its arguments. "with": One or more Content representing special options for the Rule Type. The "service" and "utility" Rule Types allow the following the FSS-0001 (Extended)\: @@ -62,6 +64,7 @@ Rule Specification: "with": One or more Content representing special options for the Rule Type. The "command" and "service" Rule Types allow the following the FSS-0003 (Extended List)\: + "freeze": A list repesenting multiple programs and their respective arguments to execute. "kill": A list repesenting multiple programs and their respective arguments to execute. "pause": A list repesenting multiple programs and their respective arguments to execute. "reload": A list repesenting multiple programs and their respective arguments to execute. @@ -69,8 +72,10 @@ Rule Specification: "resume": A list repesenting multiple programs and their respective arguments to execute. "start": A list repesenting multiple programs and their respective arguments to execute. "stop": A list repesenting multiple programs and their respective arguments to execute. + "thaw": A list repesenting multiple programs and their respective arguments to execute. The "script" and "utility" Rule Types allow the following the FSS-0003 (Extended List)\: + "freeze": A list repesenting the contents of a script, such as a GNU Bash shell. "kill": A list repesenting the contents of a script, such as a GNU Bash shell. "pause": A list repesenting the contents of a script, such as a GNU Bash shell. "reload": A list repesenting the contents of a script, such as a GNU Bash shell. @@ -78,3 +83,4 @@ Rule Specification: "resume": A list repesenting the contents of a script, such as a GNU Bash shell. "start": A list repesenting the contents of a script, such as a GNU Bash shell. "stop": A list repesenting the contents of a script, such as a GNU Bash shell. + "thaw": A list repesenting the contents of a script, such as a GNU Bash shell. -- 1.8.3.1