Seagate / halon

High availability solution
Apache License 2.0
1 stars 0 forks source link

scripts/h0: Add "plumbing" commands #1527

Closed vvv closed 5 years ago

vvv commented 5 years ago
"Plumbing" commands (rarely need to be called directly):
    check-access    Check SSH accessibility of cluster nodes.
    prelink         Ensure that Mero executables are linked.
    genfacts        Generate facts and roles files.
    install         Install Mero and Halon systemd services.
    uninstall       Uninstall Mero and Halon systemd services.
    erase-data      Delete cluster data, facts and roles files.
    start-halond    Start halond on cluster nodes.
    stop-halond     Stop halond on cluster nodes.
    stop-kernel     Unload Mero kernel modules.

Plumbing commands are supposed to be used by advanced users, who want to skip certain steps of h0 init/fini and know what they are doing.

For example, if the user prefers to avoid regeneration of the facts file (this operation is time-consuming on big clusters), she can run h0 erase-data start-halond and h0 stop-halond stop-kernel erase-data instead of usual h0 init and h0 fini

For the reference, this is how h0 init/fini are implemented:

cmd_init() {
    cmd_check_access
    cmd_prelink
    cmd_install
    cmd_erase_data
    cmd_start_halond
    cmd_genfacts
}

cmd_fini() {
    cmd_check_access || true
    cmd_stop_halond || true
    cmd_stop_kernel || true
    cmd_erase_data
    cmd_uninstall
}

Delete scripts/m0provision.

chumakd commented 5 years ago

merged

chumakd commented 5 years ago

enabled an automatic merge when the pipeline for 582330a1bde1bf568b712214af0d913d1433e31a succeeds

andriytk commented 5 years ago

Sounds good now. Let's land it!

vvv commented 5 years ago

added 1 commit

Compare with previous version

vvv commented 5 years ago

assigned to @dmitriy.chumak

vvv commented 5 years ago

removed assignee

vvv commented 5 years ago

added 4 commits

Compare with previous version

vvv commented 5 years ago

added 2 commits

Compare with previous version

vvv commented 5 years ago

changed the description

vvv commented 5 years ago

changed title from *{-WIP: scripts/h0: Add extended commands (x_)-} to {+scripts/h0: Add "plumbing" commands+}**

vvv commented 5 years ago

unmarked as a Work In Progress

vvv commented 5 years ago

added 3 commits

Compare with previous version

vvv commented 5 years ago

marked as a Work In Progress

vvv commented 5 years ago

@andriy.tkachuk OK.

andriytk commented 5 years ago

I don't like that x_ prefix. Can we just drop it? What's wrong with having install/erase etc. commands without that prefix?

chumakd commented 5 years ago

added 3 commits

Compare with previous version

vvv commented 5 years ago

@dmitriy.chumak It must have been all those years of sitting next to a Perl programmer... :radioactive:

chumakd commented 5 years ago

@vvv good rework, though it feels on the edge of comprehensibility - dark side of the bash force almost got you :grin:

vvv commented 5 years ago

@andriy.tkachuk Please check new h0, as time permits, and let me know if it meets your needs. I won't land the patch until then. Thank you.

vvv commented 5 years ago

I'd prefer to delete it later after I try the new commands and make sure they are sufficient.

No half-measures! :cowboy:

andriytk commented 5 years ago

Probably. But I'd prefer to delete it later after I try the new commands and make sure they are sufficient.

Thank you!

vvv commented 5 years ago

changed the description

vvv commented 5 years ago

added 2 commits

Compare with previous version

vvv commented 5 years ago

mentioned in merge request #1520

vvv commented 5 years ago

@andriy.tkachuk I believe that m0provision is not needed any more. Please confirm.

vvv commented 5 years ago

assigned to @dmitriy.chumak