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

Cannot connect to n0001 and n0002 #1

Open
laytonjbgmail opened this issue Sep 15, 2022 · 3 comments
Open

Cannot connect to n0001 and n0002 #1

laytonjbgmail opened this issue Sep 15, 2022 · 3 comments

Comments

@laytonjbgmail
Copy link

Good morning,

First - thanks for the instructions on WW4 and KVM!! I'm gald someone did this.

I followed the directions in your medium.com article (https://medium.com/@panda1100/warewulf-v4-sandboxing-environment-on-kvm-using-vagrant-f0e23fc1ce52) on an Ubuntu 20.04 system. I ran into a few errors.

  1. When I tried installing the vagrant plugin, I got the following error:
$ vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Done installing documentation for  after 0 seconds
Traceback (most recent call last):
	18: from /usr/bin/vagrant:23:in `<main>'
	17: from /usr/bin/vagrant:23:in `load'
	16: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/bin/vagrant:177:in `<top (required)>'
	15: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/environment.rb:290:in `cli'
	14: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/cli.rb:66:in `execute'
	13: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/commands/plugin/command/root.rb:66:in `execute'
	12: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/commands/plugin/command/install.rb:69:in `execute'
	11: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/commands/plugin/command/install.rb:69:in `each'
	10: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/commands/plugin/command/install.rb:70:in `block in execute'
	 9: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/commands/plugin/command/base.rb:14:in `action'
	 8: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
	 7: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
	 6: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
	 5: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
	 4: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
	 3: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
	 2: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
	 1: from /usr/share/rubygems-integration/all/gems/vagrant-2.2.6/plugins/commands/plugin/action/install_gem.rb:30:in `call'
/usr/share/rubygems-integration/all/gems/vagrant-2.2.6/lib/vagrant/plugin/manager.rb:156:in `install_plugin': undefined method `name' for nil:NilClass (NoMethodError)

Is this a problem? (I was able to go to the next steps)

  1. When I tried vagrant up I got the following errors at the very end:
    server: 47 files removed
    server: Rebuilding container...
    server: Created image for VNFS container rocky-8: /var/lib/warewulf/container/rocky-8.img
    server: Compressed image for VNFS container rocky-8: /var/lib/warewulf/container/rocky-8.img.gz
    server: Found kernel at: /boot/vmlinuz-4.18.0-305.3.1.el8_4.x86_64
    server: ERROR  : Failed building kernel: Failed creating image for 4.18.0-305.3.1.el8_4.x86_64 drivers: /var/lib/warewulf/kernel/4.18.0-305.3.1.el8_4.x86_64/kmods.img: exit status 2
    server: ERROR: unknown flag: --netdefault
    server: /tmp/vagrant-shell: line 11: /var/warewulf/overlays/system/default/etc/sysconfig/network-scripts/ifcfg-eth1.ww: No such file or directory
    server: /tmp/vagrant-shell: line 22: /var/warewulf/overlays/system/default/etc/sysconfig/network-scripts/ifcfg-eth0.ww: No such file or directory
    server: ERROR: unknown shorthand flag: 'a' in -a
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

I'm not sure of the error and if it needs correcting or it can ignored.

  1. I then ran the command vagrant up n0001 and the output seems normal (I did this from the original host and not the VM for the 'server')
$ vagrant up n0001
Bringing machine 'n0001' up with 'libvirt' provider...
==> n0001: Creating domain with the following settings...
==> n0001:  -- Name:              ww_sandbox_n0001
==> n0001:  -- Domain type:       kvm
==> n0001:  -- Cpus:              1
==> n0001:  -- Feature:           acpi
==> n0001:  -- Feature:           apic
==> n0001:  -- Feature:           pae
==> n0001:  -- Memory:            4192M
==> n0001:  -- Management MAC:    
==> n0001:  -- Loader:            
==> n0001:  -- Nvram:             
==> n0001:  -- Storage pool:      default
==> n0001:  -- Image:              (G)
==> n0001:  -- Volume Cache:      default
==> n0001:  -- Kernel:            
==> n0001:  -- Initrd:            
==> n0001:  -- Graphics Type:     vnc
==> n0001:  -- Graphics Port:     -1
==> n0001:  -- Graphics IP:       127.0.0.1
==> n0001:  -- Graphics Password: Not defined
==> n0001:  -- Video Type:        cirrus
==> n0001:  -- Video VRAM:        9216
==> n0001:  -- Sound Type:	
==> n0001:  -- Keymap:            en-us
==> n0001:  -- TPM Path:          
==> n0001:  -- Boot device:        {"network"=>"pxe"}
==> n0001:  -- INPUT:             type=mouse, bus=ps2
==> n0001: Starting domain.

Is this output expected?

  1. Then I ssh to the VM "server" and then tried to ssh to n0001 using the command ssh -t -vvv n0001 sl and it could not resolve the hostname.
$ ssh -t -vvv n0001 sl
OpenSSH_8.0p1, OpenSSL 1.1.1k  FIPS 25 Mar 2021
debug1: Reading configuration data /home/vagrant/.ssh/config
debug1: /home/vagrant/.ssh/config line 2: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug2: checking match for 'final all' host n0001 originally n0001
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: not matched 'final'
debug2: match not found
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /home/vagrant/.ssh/config
debug1: /home/vagrant/.ssh/config line 2: Applying options for *
debug2: add_identity_file: ignoring duplicate key ~/.ssh/cluster
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 52: Including file /etc/ssh/ssh_config.d/05-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf
debug2: checking match for 'final all' host n0001 originally n0001
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 3: matched 'final'
debug2: match found
debug3: /etc/ssh/ssh_config.d/05-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1-]
debug3: kex names ok: [curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1]
debug2: resolving "n0001" port 22
ssh: Could not resolve hostname n0001: Name or service not known

I looked at /etc/hosts and did not see n0001 nor n0002. I believe this is the problem.

# more /etc/host
host.conf       hostname        hosts           hosts.wwbackup  
[root@warewulf-server vagrant]# more /etc/hosts
127.0.0.1	warewulf-server	warewulf-server
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
# Do not edit after this line
# This block is autogenerated by warewulf
# Host:   warewulf-server
# Time:   09-15-2022 12:21:01 UTC
# Source: /var/lib/warewulf/overlays/host/etc/hosts.ww


# Warewulf Server
10.0.0.254 warewulf warewulf-server 

I don't know how to fix this when the compute nodes are brought up (I could always add them them manually.

Than you for your help!!

@panda1100
Copy link
Owner

@laytonjbgmail Thanks for the heads up! In the meantime, could you please check my medium post. https://medium.com/@panda1100/warewulf-v4-sandboxing-environment-on-kvm-using-vagrant-f0e23fc1ce52

@panda1100
Copy link
Owner

panda1100 commented Sep 16, 2022

@laytonjbgmail Sorry, I checked your comment on my mobile last time and now I realized you already read my medium post.

One thing I have found so far is that I tested against Warewulf 4.2.0. But, If you run this Vagrantfile at present, it actually pulled Warewulf 4.3.0 from our official repository. Changes between 4.2.0 and 4.3.0 is relatively big (sorry for the ambiguous expression). If you pull 4.2.0, that should be work as expected.

Please refer this page (https://github.com/hpcng/warewulf/releases) for the changes.

@panda1100
Copy link
Owner

@laytonjbgmail

#1 I can say that you can ignore that error. It looks like when you install vagrant, vagrant-libvirt is also installed. So, you don't need to install vagrant plugin. Please see details here vagrant-libvirt/vagrant-libvirt#1074

#2 You can not ignore this error.
Please use dnf install -y warewulf-4.2.0-2.el8 instead of dnf install -y warewulf, that makes this Vagrantfile get to work.

#3 Yes, that looks good to me.

#4 This one is result of #2 failure. Now it should work fine with #2 workaround.
vagrant ssh server
sudo su
ssh -t n0001 sl

Have a nice day!

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

No branches or pull requests

2 participants