ClusterLabs / ClusterLabs/anvil

"error_0377" in words.xml refers to "host", operative function in `striker-initialize-host` tests `$anvil->data->{data}{type} ne "node")`

Open
#671 1 comment 0 reactions 1 assignee Claimed by @digimer View on GitHub
priority low ready for testing
Dominant language
Perl
Stars
7
Forks
6
PR merge metrics
No merged PRs in 30d

Description

This issue pertains to the following package versions:
anvil-core-2.92-1.2.9cfa.el9.noarch
anvil-striker-2.92-1.2.9cfa.el9.noarch

Using `striker-initialize-host` with --type host results in the following error:

```
[root@mh-striker01 ~]# striker-initialize-host --target 192.168.1.175 --password $ANVIL_PASS --type host
[ Error ] - The '--type' must be 'host' or 'dr'. Was given: [host].
```

This appears to be due to the if statement on line 1129 of `striker-initialize-host`, which reads [in context]:
```
...
1129 if (($anvil->data->{data}{type} ne "node") && ($anvil->data->{data}{type} ne "dr"))
1130 {
1131 $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, 'print' => 1, key => "error_0377", variables => { type => $anvil->data->{data}{type} }});
1132 update_progress($anvil, 100, "error_0377,!!type!".$anvil->data->{data}{type}."!!");
1133 $anvil->nice_exit({exit_code => 1});
1134 }
...
```

Apparent fix: Change error_0377 to refer to "node" rather than "host" or modify line 1129 of `striker-initialize-host` to test for `--type host` instead of `--type node`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.