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

Start xCAT container, the networks table has not been set up correctly #9

Open
hu-weihua opened this issue Apr 4, 2019 · 8 comments
Labels
bug Something isn't working pending
Milestone

Comments

@hu-weihua
Copy link

Start xCAT container, the networks table has not been set up correctly.

  • The provision network is 10 network

  • How to start xcat container

docker run -d --name xcatmn --network=host --hostname c910f04x30v02 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /opt/xcat/share/xcat/tools/autotest/:/opt/xcat/share/xcat/tools/autotest/ -v /tmp/automation_mountpoint:/tmp/automation_mountpoint -v /etc/hosts:/tmp/hosts -v /RHEL-7.6-Server-x86_64-dvd1-stable.iso:/RHEL-7.6-Server-x86_64-dvd1-stable.iso -v /var/log/dockercontainerlog:/var/log -v /var/log/dockercontainerlog/xcat:/var/log/xcat -v /root/.ssh/:/root/.ssh/ -v /xCAT-test-2.15-snap201904030619.noarch.rpm:/xCAT-test-2.15-snap201904030619.noarch.rpm robin2008/xcat2:2.14.6
  • The Nic info in container
[root@c910f04x30v02 ~]# docker exec -it xcatmn /bin/bash

[root@c910f04x30v02 xcat]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 42:cb:0a:04:1e:03 brd ff:ff:ff:ff:ff:ff
    inet 10.4.30.3/8 brd 10.255.255.255 scope global dynamic eth0
       valid_lft 42604sec preferred_lft 42604sec
    inet6 fe80::40cb:aff:fe04:1e03/64 scope link
       valid_lft forever preferred_lft forever
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:d1:89:c2:e4 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
  • The settings in networks table
[root@c910f04x30v02 xcat]# tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
"172_17_0_0-255_255_0_0","172.17.0.0","255.255.0.0","eth0","172.17.0.1",,"<xcatmaster>",,,,,,,,,,,"1500",,
@hu-weihua hu-weihua added this to the 2.14.6 milestone Apr 4, 2019
@robin2008
Copy link
Member

Need to re-init the data (xcatconfig -i xcatconfig -d) when first run the container, then xcatconfig will populate the DB from based on the current networking.

Now the data is only from xcat installation (this is when building the container)

@robin2008 robin2008 added the bug Something isn't working label Apr 5, 2019
@robin2008
Copy link
Member

robin2008 commented Apr 5, 2019

And the container will do the init with rc-local script, its contents are from entrypoint.sh.
The rc-local should be called by systemd, but looks like it is not working as expected always. Need to check if there is a service dependency issue.

@robin2008 robin2008 added the help wanted Extra attention is needed label Apr 5, 2019
@tingtli
Copy link

tingtli commented Apr 9, 2019

With the same steps, i also got some results.
Same with above, the network table is not set up correctly.

#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
"172_17_0_0-255_255_0_0","172.17.0.0","255.255.0.0","eth0","172.17.0.1",,"<xcatmaster>",,,,,,,,,,,"1500",,

And the site table is not set correctly

[root@c910f03c01p16 autotest]# docker exec xcatmn tabdump site
#key,value,comments,disable
"blademaxp","64",,
"fsptimeout","0",,
"installdir","/install",,
"ipmimaxp","64",,
"ipmiretries","3",,
"ipmitimeout","2",,
"consoleondemand","no",,
"master","172.17.0.2",,
"forwarders","10.0.0.103",,
"nameservers","172.17.0.2",,
"maxssh","8",,
"ppcmaxp","64",,
"ppcretry","3",,
"ppctimeout","0",,
"powerinterval","0",,
"syspowerinterval","0",,
"sharedtftp","1",,
"SNsyncfiledir","/var/xcat/syncfiles",,
"nodesyncfiledir","/var/xcat/node/syncfiles",,
"tftpdir","/tftpboot",,
"xcatdport","3001",,
"xcatiport","3002",,
"xcatconfdir","/etc/xcat",,
"timezone","Etc/UTC",,
"useNmapfromMN","no",,
"enableASMI","no",,
"db2installloc","/mntdb2",,
"databaseloc","/var/lib",,
"sshbetweennodes","ALLGROUPS",,
"dnshandler","ddns",,
"vsftp","n",,
"cleanupxcatpost","no",,
"dhcplease","43200",,
"auditnosyslog","0",,
"auditskipcmds","ALL",,

@hu-weihua
Copy link
Author

I have tried xcatconfig -i after container starting, the networks table was able to be updated, but he site table still had "master","172.17.0.2",,. Maybe need more work in xcat container initial script.

@robin2008
Copy link
Member

Try to fix this in #14

@robin2008
Copy link
Member

Still found issue in the above PR.
xcatconfig -i won't populate site table when it is already there, so it requires to xcatconfig -d first, and then xcatconfig -i; not using other combination of -c, -k as there are too much logic in xcatconfig.

Testing:
1, build a new container make build VERSION=latest
2, push to xcatdevops for later testing

docker tag xcat2:2.14.6-x86_64 xcatdevops/xcat2:2.14.6-x86_64

# docker login -u robin2008
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
# docker push xcatdevops/xcat2:2.14.6-x86_64
The push refers to repository [docker.io/xcatdevops/xcat2]
1c31f3458fc9: Pushed
b03b48b5dc6f: Pushed
aca4bbf46e46: Pushed
9e3dcfa22a57: Pushing [===========>                                       ]  196.1MB/850.5MB
b162b9cc72b1: Pushed
ce451e0c3a23: Layer already exists
bcc97fbfc9e1: Layer already exists

docker logout

3, pull it and testing

docker run -d --name xcatmn --network=host --hostname c910f04x27v22 --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /xcatdata:/xcatdata -v /root/.ssh:/root/.ssh xcatdevops/xcat2:2.14.6-x86_64
Unable to find image 'xcatdevops/xcat2:2.14.6-x86_64' locally
2.14.6-x86_64: Pulling from xcatdevops/xcat2
...

4, check the result

docker exec -it xcatmn /bin/bash

[root@c910f04x27v22 /]# tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
"172_17_0_0-255_255_0_0","172.17.0.0","255.255.0.0","eth0","172.17.0.1",,"<xcatmaster>",,,,,,,,,,,"1500",,
"10_0_0_0-255_0_0_0","10.0.0.0","255.0.0.0","eth0","10.0.0.101",,"<xcatmaster>",,,,,,,,,,,"1500",,


[root@c910f04x27v22 /]# tabdump site|grep domain
"domain","example.com",,
[root@c910f04x27v22 /]# tabdump site|grep master
"master","10.4.27.22",,

@robin2008 robin2008 removed the help wanted Extra attention is needed label Apr 19, 2019
@robin2008
Copy link
Member

okay, this is covered in #15, and the container is uploaded, please verify it.

@hu-weihua
Copy link
Author

@robin2008 , it seems the network is set correctly, but the master in site table still is 172.17.0.2.

[root@xcat2latest /]# tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
"172_17_0_0-255_255_0_0","172.17.0.0","255.255.0.0","eth0","172.17.0.1",,"<xcatmaster>",,,,,,,,,,,"1500",,
"10_0_0_0-255_0_0_0","10.0.0.0","255.0.0.0","eth1","10.0.0.101",,"<xcatmaster>",,,,,,,,,,,"1500",,

[root@xcat2latest /]# tabdump site
#key,value,comments,disable
"blademaxp","64",,
"fsptimeout","0",,
"installdir","/install",,
"ipmimaxp","64",,
"ipmiretries","3",,
"ipmitimeout","2",,
"consoleondemand","no",,
"master","172.17.0.2",,
"forwarders","10.0.0.103",,
"nameservers","172.17.0.2",,
"maxssh","8",,
"ppcmaxp","64",,
"ppcretry","3",,
"ppctimeout","0",,
"powerinterval","0",,
"syspowerinterval","0",,
"sharedtftp","1",,
"SNsyncfiledir","/var/xcat/syncfiles",,
"nodesyncfiledir","/var/xcat/node/syncfiles",,
"tftpdir","/tftpboot",,
"xcatdport","3001",,
"xcatiport","3002",,
"xcatconfdir","/etc/xcat",,
"timezone","Etc/UTC",,
"useNmapfromMN","no",,
"enableASMI","no",,
"db2installloc","/mntdb2",,
"databaseloc","/var/lib",,
"sshbetweennodes","ALLGROUPS",,
"dnshandler","ddns",,
"vsftp","n",,
"cleanupxcatpost","no",,
"dhcplease","43200",,
"auditnosyslog","0",,
"auditskipcmds","ALL",,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending
Projects
None yet
Development

No branches or pull requests

3 participants