Open nexus-uw opened 4 years ago
Hello. Me as well. But I did "cleanup.sh", after that it's fine in my case.
$ ./setup.sh
privateIP: machine.runtimeNetworks[0].ip,
^
TypeError: Cannot read property '0' of undefined
at /home/shinichi/work/wks-quickstart-firekube/setup.js:114:41
$ ./cleanup.sh
Deleting virtual machines
INFO[0000] Deleting machine: firekube-node0 ...
INFO[0000] Deleting machine: firekube-node1 ...
$ ./setup.sh
Using git branch: master
Using git remote: origin
Found jk 0.3.0
Found footloose 0.6.3
Found ignite 0.7.1
Found wksctl 0.8.4
Creating footloose manifest
Creating virtual machines
INFO[0000] Docker Image: weaveworks/ignite-centos:firekube-pre3 present locally
INFO[0000] Creating machine: firekube-node0 ...
INFO[0002] Creating machine: firekube-node1 ...
Creating Cluster API manifests
Updating container images and git parameters
Pushing initial cluster configuration
*** Please tell me who you are.
Running cleanup doesn't resolve this for me. Forging forward with versioning.
Ignite version: version.Info{Major:"0", Minor:"9"
kubectl version client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
jk 0.3.0
footloose 0.6.3
ignite 0.9.0
wksctl 0.10.2
System Kernel 4.19.0-14-amd64 #1 SMP Debian
Client: Docker Engine - Community
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:17:50 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:15:47 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
I'm failing every time with
• Creating Cluster API manifests
/firekube/setup.js:114
privateIP: machine.runtimeNetworks[0].ip,
^
TypeError: Cannot read property '0' of undefined
at /firekube/setup.js:114:41
This looks like something happening with footloose and ignite, because if I swap the backend to docker, everything stands up accordingly, but it could be an issue with the cni plugin. I'm using the default config for ignite.
If I had to take a wild guess, it's due to this
func (m *Machine) igniteStatus(s *MachineStatus) error {
vm, err := ignite.PopulateMachineDetails(m.name)
if err != nil {
return err
}
// Set Ports
var ports []port
for _, p := range vm.Spec.Network.Ports {
ports = append(ports, port{
Host: int(p.HostPort),
Guest: int(p.VMPort),
})
}
s.Ports = ports
if vm.Status.IpAddresses != nil && len(vm.Status.IpAddresses) > 0 {
m.ip = vm.Status.IpAddresses[0]
}
s.RuntimeNetworks = NewIgniteRuntimeNetwork(&vm.Status)
return nil
}
Not properly seeing that it's an ignite vm? And trying to pull details from a docker container that isn't there?
@stealthybox this is what I was referring to in https://github.com/weaveworks/ignite/issues/614
I thought my pr resolved the issue, but it actually causes the script to ignore the ignite backend designation, and reverts to Docker.
I'm have this same issue is there a fix / workaround for this?
I guess it has to do with versions because I have same versions as above
• Found jk 0.3.0 • Found footloose 0.6.3 • Found ignite 0.9.0 • Found wksctl 0.10.2
If it helps i had the same issue, but because of some previous failed installation. After i executed ./cleanup.sh
issue gone.
Having the same issue but cleanup.sh
is not fixing it.
It's definitely footloose - if you look at setup.sh
you see footloose generates a status json file, which is then read by jk
, and jk
is looking for a field called runtimeNetworks which is not there (jk
translates json into javascript objects).
This is how you can see the json being produced by footloose:
sudo ~/.wks/bin/footloose status -o json > status.json
Look at the output and you'll see a list of machines.
Then you can read it into jk
like this and see the same error:
~/.wks/bin/jk generate -f config.yaml -f status.json setup.js
(This is just mimicking what setup.sh
does.)
Oh I should add that I had to add the ignite binary to the sudo
folder cause the above commands complained otherwise https://confluence.jaytaala.com/display/TKB/Adding+folder%28s%29+to+Sudoers+%28sudo%29+Path
I ended up installing ignite manually https://github.com/weaveworks/ignite/blob/main/docs/installation.md#downloading-the-binary and then putting /usr/local/bin
at the end of the sudo defaults, but I suppose /home/{user}/.wks/bin
should work too...
`./setup.sh • Using git branch: main • Using git remote: origin
• Found jk 0.4.0
• Found footloose 0.6.3
• Found ignite 0.10.0
• Found wksctl 0.10.2
• Creating footloose manifest
• Creating virtual machines
INFO[0000] Docker Image: harbor.platomics.com/proxy/weaveworks/ignite-centos:7-v0.10.0 present locally
INFO[0000] Creating machine: firekube-node0 ...
INFO[0002] Creating machine: firekube-node1 ...
• Creating Cluster API manifests
/home/ubuntu/repostories/platomics/firekube/setup.js:114
privateIP: machine.runtimeNetworks[0].ip,
^
TypeError: Cannot read property '0' of undefined
at /home/ubuntu/repostories/platomics/firekube/setup.js:114:41
Module (setup.js) has not been loaded`
I still get the same problem that my machine definition is missing runtimeNetworks even after installing firecube from scatch. Any advice for me to investigate the problem further ?
If you got this error then most probably you installed ignite
's latest version before firekube
, and when wks-quickstart-firekube
runs its setup.sh script and finds ignite
binary, it skips downloading the version 0.7.1
. If you have a version superior to this version then downgrade because this repo is only tested with the versions mentioned in ./setup.sh.
I had the same problem, and as @zakariaboualaid suggests it is due to the fact that the repository and the scripts included within are expecting ignite version 0.7.1
.
If you had installed the latest and greatest ignite, you need to perform some cleanup. For me, this is what worked:
It was necessary for me to remove the fireracker folder in step 2. But experience caution, perhaps get a backup instead of removing it.
--force-download
will actually download the ignite version 0.7.1
to /root/.wks/bin
which means you don't have to uninstall your latest and greatest ignite while experimenting with this repository.
P.S Prior to executing ./setup.sh
, you would also likely need to configure git login for the sudo user.
sudo git config --global user.email "my@email.com"
sudo git config --global user.name "me"
meanwhile, I am now getting another error:
during the execution of:
wksctl apply --git-url=https://github.com/basaran/wks-quickstart-firekube.git --git-branch=master
INFO[2023-03-14T11:08:19-04:00] Applying resource="install:base"
INFO[2023-03-14T11:08:19-04:00] Applying resource="install:yum-utils"
INFO[2023-03-14T11:08:19-04:00] Applying resource="install:yum-versionlock"
ERRO[2023-03-14T11:08:21-04:00] Failed resource="install:yum-versionlock"
command exited with 1
INFO[2023-03-14T11:08:21-04:00] State of Resource 'top' is Invalid.
Explanation:
{
"resource": "top",
"status": "Invalid"
}
ERRO[2023-03-14T11:08:21-04:00] Failed resource="install:base"
hi, I cloned the latest from master earlier today. the setup files fails due to
any insights in what i am missing would be greatly appreciated.
machine info below