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

Resolve: Dynamic disk configuration is not correctly provisioned #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vponomarev
Copy link

Fixed several issues in single commit.
All changes were tested on Ubuntu 20.04 LTS in 5-nodes cluster, each with 5 /dev/sdX spare disks for dynamic provisioning.
Right now i disabled parallel volume server deployment, but it can be returned back if it's really needed.

List of issues:

  1. Non root user with passwordless sudo didn't handled correctly
  2. Minor issue in systemd service fixed
  3. Added option --dynamicFile <name_of_dynamic_config_file.yml> for dynamic disk provisioning
  4. Fixed automatic disk mount feature - disks are provisioned, info is saved in dynamic config. Redeploy will not lose disk information.

To use dynamic provisioning now user need to specify file with/for dynamically provisioned data -f filename, for example, cluster can be provisioned by this command:

./seaweed-up deploy --version 3.43 --envoyVersion 1.25.3 -u ubuntu -f examples/cluster2.yml -d examples/cluster2-dynamic.yml -x http://proxy.local:8080/

Now it's possible to run deploy several times, all disk info will be provisioned correctly (at least, it's provisioned correctly in my test lab).

Vitaliy Ponomarev added 2 commits March 28, 2023 18:09
1. Non root user with passwordless sudo didn't handled correctly
2. Minor issue in systemd service fixed
3. Added option `--dynamicFile <name_of_dynamic_config_file.yml>` for dynamic disk provisioning
4. Fixed automatic disk mount feature - disks are provisioned, info is saved in dynamic config. Redeploy will not lose disk information.
@@ -28,10 +28,12 @@ func DeployCommand() *coral.Command {
}
var fileName string
cmd.Flags().StringVarP(&fileName, "file", "f", "", "configuration file")
cmd.Flags().StringVarP(&m.DynamicConfigFile, "dynamicFile", "d", "", "dynamic configuration file")
Copy link
Contributor

Choose a reason for hiding this comment

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

what is a dynamic configuration file?

@chrislusf
Copy link
Contributor

Thanks for the PR! Please split into separate ones for easier review.

@vponomarev
Copy link
Author

Hello.

I planned to divide this PR into separate parts, but didn't find a way to make separate and well specified parts.
Unfortunately, it's deeply connected with each other.
Maybe you can suggest some ideas?

Issues #1, #2 are really minor i can make them separate, but there're only 2-3 lines changes for that.

All other changes are connected to dynamic configuration idea.
Core idea is:
We cannot make correct changes in original cluster configuration file - it can contain coments and we'll loose this comments if we rewrite config, so we should have 2 config files:

  • config, that was created by user
  • automatically generated config, that was prepared during spare disk provisioning

So, dynamic config file is a filename for dynamically created configuration.
This file contains map[string][]spec.FolderSpec, i.e. for each server we will specify list of folders with all related information.
During cluster provisioning all newly created folders will be saved in dynamic config file, node configuration will also be created according to dynamic config file configuration. All next runs will take into account this dynamic config.
The main problem for now - dynamic config doesn't know anything about disk replacement, so after replacing of dead drive it will create a new folder for it and will not delete references to old one.

@vponomarev
Copy link
Author

@chrislusf Could you please review my comment?
I'd like to proceed with this PR

@chrislusf
Copy link
Contributor

How about adding an optional step before deploying anything, to generate a disk layout yaml file?

@chrislusf
Copy link
Contributor

And maybe even merge the proposed disk layout info into the original cluster yaml file.

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.

2 participants