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

usage of public and private ip addresses #115

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

travisn
Copy link
Member

@travisn travisn commented Oct 26, 2016

The public and private ip addresses are now required parameters to castled.

  • The public ip is used by ceph mons
  • The private ip is used by internal etcd

rook node ls will show both the public and private ip, though we may want to change that.

rootCmd.Flags().StringVar(&cfg.publicIPv4, "public-ipv4", "", "public IPv4 address for this machine")
rootCmd.Flags().StringVar(&cfg.privateIPv4, "private-ipv4", "127.0.0.1", "private IPv4 address for this machine")
rootCmd.Flags().StringVar(&cfg.publicIPv4, "public-ipv4", "", "public IPv4 address for this machine (required)")
rootCmd.Flags().StringVar(&cfg.privateIPv4, "private-ipv4", "", "private IPv4 address for this machine (required)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default we had (localhost) for private IP worked really well for the Ubuntu single node scenario, where you don't have to pass a single param. I liked that, is there anyway we can still support that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my thought for the dev case is that you would put the env vars in your bashrc
ROOKD_PUBLIC_IPV4
ROOKD_PRIVATE_IPV4

@@ -65,7 +65,7 @@ func TestOSDAgentWithDevices(t *testing.T) {
}

// prep the etcd keys that would have been discovered by inventory
disksKey := path.Join(inventory.GetNodeConfigKey(context.NodeID), inventory.DisksKey)
disksKey := path.Join(inventory.GetNodeConfigKey(context.NodeID), "disks")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is a bit unexpected for this PR, what caused it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a side effect of making DisksKey a private disksKey. As I'm touching code, I look for places where we don't need public access. Since this is just a single test, it wasn't worth keeping the property public.

for _, reqFlag := range requiredFlags {
val, err := cmd.Flags().GetString(reqFlag)
if err != nil || val == "" {
return createRequiredFlagError(cmd, reqFlag)
missingFlags = append(missingFlags, reqFlag)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice, i like how multiple missing flags can be bubbled up in the error to the user now

@bassam
Copy link
Member

bassam commented Oct 27, 2016

I dont think the ip address should be required. We should have some good default if nothing else but the simple dev scenario.

@travisn
Copy link
Member Author

travisn commented Oct 27, 2016

what should the default ip addresses be? Should we look for eth0 and set the public and private ips both to the same address? I worry about automating that or setting a default for the dev environment such as 127.0.0.1 since you would never want that in a production env.

@bassam
Copy link
Member

bassam commented Oct 27, 2016

the default should be to listen on all network interfaces.

@travisn
Copy link
Member Author

travisn commented Oct 27, 2016

the ip addresses are also used for members of the cluster to know how to talk to each other, so we need specific ips.

@travisn travisn merged commit 811c0bd into rook:master Oct 27, 2016
@travisn travisn deleted the public-private-ip branch October 27, 2016 18:13
@bassam
Copy link
Member

bassam commented Oct 27, 2016

What does etcd default to? It comes up with no Params. Maybe local host? I still don't think the params should be required.

thotz pushed a commit to thotz/rook that referenced this pull request Jun 5, 2020
…ecret and CM (rook#115)

* delete k8s resources after Delete/Revoke return non-nil err

Signed-off-by: jeffvance <jeff.h.vance@gmail.com>

* add ownerReference

Signed-off-by: jeffvance <jeff.h.vance@gmail.com>

* review comments & gofmt

Signed-off-by: jeffvance <jeff.h.vance@gmail.com>
leseb added a commit to leseb/rook that referenced this pull request Sep 21, 2020
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.

None yet

3 participants