Open ayo19900212 opened 4 days ago
但是经过我查看发现/opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb,这个文件确实不存在,而且包都是rpm结尾的
@ayo19900212 hi,麻烦附上ISO信息,可以通过下面的命令查询
cat /opt/zstack-dvd/x86_64/h84r/VERSION
@yuxingwei ZStack-x86_64-DVD-4.8.18-240929-h84r.iso
@yuxingwei ZStack-x86_64-DVD-4.8.18-240929-h84r.iso
@ayo19900212 请问能否提供详细的操作步骤以便让我帮助你来排查问题原因。例如问题环境中管理节点和计算节点操作系统安装使用的ISO,如果使用官网提供的ISO,安装前选择的模式和后续操作等。
我尝试使用官网提供的ZStack-x86_64-DVD-4.8.18-h84r.iso
ISO镜像,选择ZStack Enterprise Management Node
模式安装后初始化添加物理机正常,但是不确定和你的步骤是否一致。
以下是我使用的ISO MD5信息:
[root@ut1 zstackio]# md5sum ZStack-x86_64-DVD-4.8.18-h84r.iso
acdc86a6402b76e48d6576dfdcbe6b77 ZStack-x86_64-DVD-4.8.18-h84r.iso
[root@ut1 zstackio]#
@yuxingwei
@yuxingwei
@ayo19900212 你这里使用的普通用户来执行添加物理机的操作,可以尝试使用root
用户看一看问题是否依旧存在。
按照你的思路,我尝试新建了一个普通用户xingwei
执行添加物理机的确存在问题,但是未能复现你的问题场景(可以再提供一些线索供我尝试复现):
2024-11-08 14:43:25,636 - DEBUG - {'dark': {}, 'contacted': {u'172.20.193.93': {'failed': True, 'failed_reason': 'failed', '_ansible_no_log': False, 'failed_modules': {'ansible.legacy.setup': {'deprecations': [{'msg': u'Distribution centos 8.4 on host 172.20.193.93 should use /usr/libexec/platform-python, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible-core/2.11/reference_appendices/interpreter_discovery.html for more information', 'version': u'2.12'}], 'module_stderr': u'xingwei is not in the sudoers file. This incident will be reported.\n', 'module_stdout': u'', 'failed': True, 'rc': 1, 'msg': u'MODULE FAILURE\nSee stdout/stderr for the exact error', 'ansible_facts': {u'discovered_interpreter_python': u'/usr/bin/python'}}}, 'msg': u'The following modules failed to execute: ansible.legacy.setup\n', 'changed': False, '_ansible_verbose_override': True, 'ansible_facts': {}}}}
2024-11-08 14:43:25,637 - ERROR - 'ansible_distribution'
看上去是没法找到目标计算节点的distribution信息。不过当我将该用户添加到/etc/sudoers
文件后,并给权限再执行添加物理机操作就可以了。
xingwei ALL=(ALL) NOPASSWD: ALL
ok,多谢,我试试 @yuxingwei
shell command[sudo bash -c '. /var/lib/zstack/virtualenv/zstacksys/bin/activate; PYTHONPATH=/usr/local/zstack/ansible/files/zstacklib timeout 10800 python2 /usr/local/zstack/ansible/kvm.py -i /usr/local/zstack/ansible/hosts --private-key /usr/local/zstack/apache-tomcat-8.5.99/webapps/zstack/WEB-INF/classes/ansible/rsaKeys/id_rsa -e '\''{ "init": "true", "chrony_servers": "10.21.255.170", "trusted_host": "10.21.255.170", "restart_libvirtd": "false", "remote_port": "22", "update_packages": "true", "host_uuid": "337ab8a149d34f319f9660c8631ccac5", "zstack_root": "/var/lib/zstack", "isEnableKsm": "none", "remote_user": "root", "hostname": "10-21-0-11.zstack.org", "pkg_kvmagent": "kvmagent-4.8.0.tar.gz", "post_url": "http://10.21.255.170:8080/zstack/kvm/ansiblelog/337ab8a149d34f319f9660c8631ccac5\n", "mn_ip": "10.21.255.170", "remote_pass": "*****", "host": "10.21.0.11", "pip_url": "http://10.21.255.170:8080/zstack/static/pypi/simple", "zstack_repo": "\"zstack-mn,qemu-kvm-ev-mn\"", "yum_server": "10.21.255.170:8080", "pkg_zstacklib": "zstacklib-4.8.0.tar.gz" }'\'] failed ret code: 1 stderr: ERROR: [ HOST: 10.21.0.11 ] ERROR: copy /opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb to /opt failed error: Could not find or access '/opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb' on the Ansible Controller. If you are using a module and expect the file to exist on the remote, see the remote_src option stdout:
@yuxingwei root用户也不行
"root":{2 items "error":{5 items "code":string"SYS.1006" "description":string"An operation failed" "details":string" shell command[sudo bash -c '. /var/lib/zstack/virtualenv/zstacksys/bin/activate; PYTHONPATH=/usr/local/zstack/ansible/files/zstacklib timeout 10800 python2 /usr/local/zstack/ansible/kvm.py -i /usr/local/zstack/ansible/hosts --private-key /usr/local/zstack/apache-tomcat-8.5.99/webapps/zstack/WEB-INF/classes/ansible/rsaKeys/id_rsa -e '\''{ "init": "true", "chrony_servers": "10.21.255.170", "trusted_host": "10.21.255.170", "restart_libvirtd": "false", "remote_port": "22", "update_packages": "true", "host_uuid": "337ab8a149d34f319f9660c8631ccac5", "zstack_root": "/var/lib/zstack", "isEnableKsm": "none", "remote_user": "root", "hostname": "10-21-0-11.zstack.org", "pkg_kvmagent": "kvmagent-4.8.0.tar.gz", "post_url": "http://10.21.255.170:8080/zstack/kvm/ansiblelog/337ab8a149d34f319f9660c8631ccac5\n", "mn_ip": "10.21.255.170", "remote_pass": "*", "host": "10.21.0.11", "pip_url": "http://10.21.255.170:8080/zstack/static/pypi/simple", "zstack_repo": "\"zstack-mn,qemu-kvm-ev-mn\"", "yum_server": "10.21.255.170:8080", "pkg_zstacklib": "zstacklib-4.8.0.tar.gz" }'\'] failed ret code: 1 stderr: ERROR: [ HOST: 10.21.0.11 ] ERROR: copy /opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb to /opt failed error: Could not find or access '/opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb' on the Ansible Controller. If you are using a module and expect the file to exist on the remote, see the remote_src option stdout: " "location":string"HostManagerImpl.java: send-connect-host-message (location:2/5)" "cost":string"109ms" } "name":string"apiError" } 请求 : "root":{7 items "username":string"root" "password":string"****" "sshPort":int22 "name":string"host1" "managementIp":string"10.21.0.11" "clusterUuid":string"b2a7045c20aa404fb037fd7c9f672ef3" "systemTags":[1 item 0:string"pageTableExtensionDisabled" ] }
但是经过我查看发现/opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb,这个文件确实不存在,而且包都是rpm结尾的