Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature servingnode #458

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open

Feature servingnode #458

wants to merge 3 commits into from

Conversation

charmster
Copy link
Contributor

Change from "PrimaryPeer" to "ServingNode" for volume groups to determine which node serves it.

Fix a bug in confgen for VirtualIP address for a volume group and add knowledge of the ServingNode to confgen. confen also requires that PublicIPAddr and PublicInterface be defined for any volume group that is exported.

craig harmer added 3 commits March 8, 2020 22:41
the tracked lock warning messages in the log for unconfigured parameters
used the wrong config variable names.  Fix that.
confgen was using the VirtualIP address of the volume group as the
private IP address used to reach proxyfs.  that is incorrect and probably
doesn't work in general (proxyfs is not going to bind to the virtual IP
addresses, particularly if they are added after Proxyfs starts up).

Added knowledge of `ServingNode` and `PreferredPeer` to confgen.
`ServingNode` overrides `PrimaryPeer` if both are present.  If neither
is present then confgen verifies that `PreferredPeer` is present (can
be empty string) or flags an error in the config.  In the future, the
first time a new volume group is loaded with `monitorctl new-config ...`
ServingNode will not be present (its set by `monitord`) and PrimaryPeer
will not be present (its deprecated), but `PreferredPeer` should be
present in this case.

Add code to confgen to require that `PublicIPAddr` and `PublicInterface`
is present in the config for each peer (node) that is serving a
VolumeGroup as a sanity check.

Fix confgen unit tests to assert that fetchVolumeInfo() did not return
an error (previously unchecked),

Tweak the sample configuration file used by the confgen unit tests
to exercise some of the ServingNode/PrimaryPeer/PreferredPeer code,
and also deleted `PrimaryPeer` from Volume entries.

Add a little logging to proxyfs Format() operation to log the results
of swiftclient.AccountGet().
Change ProxyFS, utilities, and unit tests to use "ServingNode" as
the node that serves a proxyfs file system instead of "PrimaryPeer".

The biggest part of the change is to add a function to the `transitions`
package, `GetServingNode()` that parses a ConfMap and returns the value
for ServingNode (if defined), PrimaryPeer (if defined), or an error.
An empty value results in an empty string (""), which is fine, and
is different than no OptionName at all.

This actually saves a number of lines of code.

Change most of the unit tests to say "SevingNode" instead of "PrimaryPeer"
for the "VolumeGroup" entry and delete the "PrimaryPeer" entry for
Volumes.

Add a unit test for `GetServingNode()` which tries the several
possibilities, including ServingNode and PrimaryPeer are both set,
but to different values (ServingNode wins).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant