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

create cluster - No Networks found by name "Joyent-SDC-Public" #78

Open
neuroserve opened this issue Feb 2, 2018 · 4 comments
Open
Labels

Comments

@neuroserve
Copy link

Deploying a pair of managers in an on premise Triton installation works like charm. triton-kubernetes talks to the api to learn images, packages and networks.

Deploying a cluster (and nodes for it) does not work because the network "Joyent-SDC-Public" is defined somewhere statically and cannot be changed during the "question and answer" phase.
And changing various occurrences of "Joyent-SDC-Public" in various terraform *tf files did not help either.

The error message is:

Error: Error refreshing state: 1 error(s) occurred:

  • module.cluster_triton_cl2.data.triton_network.networks: 1 error(s) occurred:

  • module.cluster_triton_cl2.data.triton_network.networks: data.triton_network.networks: No Networks found by name "Joyent-SDC-Public"

It would be nice, if the network variable could be changed for every time, it is required by Terraform to create the respective VMs.

@ShubhraKar ShubhraKar added the bug label Feb 2, 2018
@fayazg
Copy link
Contributor

fayazg commented Feb 22, 2018

Are you still having this issue after the go rewrite?

@Smithx10
Copy link

Smithx10 commented Mar 2, 2018

@fayazg

I can confirm, I just tried in a Private Cloud also.

Also, the managers aren't coming up clean if the entire cluster gets rebooted at the same time. Can we deploy mysql autopilotpattern/mysql?

edit:
Actually, that's not very portable to other clouds.

https://github.com/autopilotpattern/mysql

data.template_file.install_rancher_master: Refreshing state...
null_resource.install_rancher_master[1]: Refreshing state... (ID: 8469996742215062234)
data.template_file.setup_rancher_k8s: Refreshing state...
null_resource.install_rancher_master[0]: Refreshing state... (ID: 1866960069457497987)
data.external.rancher_environment_template: Refreshing state...
null_resource.setup_rancher_k8s: Refreshing state... (ID: 8757083058364748555)
Releasing state lock. This may take a few moments...

Error: Error refreshing state: 1 error(s) occurred:

* module.cluster_triton_my-cluster.data.triton_network.networks: 1 error(s) occurred:

* module.cluster_triton_my-cluster.data.triton_network.networks: data.triton_network.networks: No Networks found by name "Joyent-SDC-Public"

@Smithx10
Copy link

Smithx10 commented Mar 3, 2018

I found out that by changing the "triton_network_names" default to "my_default_network" in the following two files worked.

terraform/modules/triton-rancher-k8s-host/variables.tf:    "Joyent-SDC-Public",
terraform/modules/triton-rancher-k8s/variables.tf:    "Joyent-SDC-Public",
 62 variable "triton_network_names" {
 63   type        = "list"
 64   description = "List of Triton network names that the node(s) should be attached to."
 65
 66   default = [
 67     "Joyent-SDC-Public",
 68   ]
 69 }

I found this quite quickly by using git grep.

bruce.smith@Bruces-MacBook-Pro /g/s/triton-kubernetes ❯❯❯ git grep Joyent-SDC-Public                                                                                                                                                                    master
examples/silent-install/sample-create-ha-cluster.yaml:      - Joyent-SDC-Public
examples/silent-install/sample-create-ha-cluster.yaml:      - Joyent-SDC-Public
examples/silent-install/sample-create-ha-cluster.yaml:      - Joyent-SDC-Public
examples/silent-install/sample-create-ha-manager.yaml:  - Joyent-SDC-Public
examples/silent-install/sample-create-non-ha-cluster.yaml:      - Joyent-SDC-Public
examples/silent-install/sample-create-non-ha-manager.yaml:  - Joyent-SDC-Public
terraform/create-rancher-env.tf:    "Joyent-SDC-Public",
terraform/create-rancher.tf:  triton_network_names = ["Joyent-SDC-Public", "Joyent-SDC-Private"]
terraform/modules/triton-rancher-k8s-host/variables.tf:    "Joyent-SDC-Public",
terraform/modules/triton-rancher-k8s/variables.tf:    "Joyent-SDC-Public",
vendor/github.com/joyent/triton-go/network/networks_test.go:                                    toFind := []string{"Joyent-SDC-Private", "Joyent-SDC-Public"}

I imagine that there is some logic that is not over riding that default. I might dig into later if I get some time. But this should help until @fayazg can fix it.

@neuroserve
Copy link
Author

Hm.
Error: Error refreshing state: 1 error(s) occurred:

  • module.cluster_triton_clu1.data.triton_network.networks: 1 error(s) occurred:
  • module.cluster_triton_clu1.data.triton_network.networks: data.triton_network.networks: No Networks found by name "Joyent-SDC-Public"

root@e3b75fc5-3621-cdd8-f9dd-c9acbf4a37e9:~/triton-kubernetes# git grep Joyent-SDC-Public
examples/silent-install/sample-create-ha-cluster.yaml - Joyent-SDC-Public
examples/silent-install/sample-create-ha-cluster.yaml - Joyent-SDC-Public
examples/silent-install/sample-create-ha-cluster.yaml - Joyent-SDC-Public
examples/silent-install/sample-create-ha-manager.yaml - Joyent-SDC-Public
examples/silent-install/sample-create-non-ha-cluster.yaml - Joyent-SDC-Public
examples/silent-install/sample-create-non-ha-manager.yaml - Joyent-SDC-Public
vendor/github.com/joyent/triton-go/network/networks_test.go toFind := []string{"Joyent-SDC-Private", "Joyent-SDC-Public"}

Do I have to change the "toFind" string in networks_test.go and rebuild?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants