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

zstack安装完成后,添加物理机失败 #1357

Open
ayo19900212 opened this issue Nov 8, 2024 · 9 comments
Open

zstack安装完成后,添加物理机失败 #1357

ayo19900212 opened this issue Nov 8, 2024 · 9 comments

Comments

@ayo19900212
Copy link

image
但是经过我查看发现/opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb,这个文件确实不存在,而且包都是rpm结尾的
image

@yuxingwei
Copy link

image 但是经过我查看发现/opt/zstack-dvd/x86_64/h84r/Packages/zstack-release_h84r_all.deb,这个文件确实不存在,而且包都是rpm结尾的 image

@ayo19900212 hi,麻烦附上ISO信息,可以通过下面的命令查询

cat /opt/zstack-dvd/x86_64/h84r/VERSION

@ayo19900212
Copy link
Author

ayo19900212 commented Nov 8, 2024

@yuxingwei ZStack-x86_64-DVD-4.8.18-240929-h84r.iso

@yuxingwei
Copy link

yuxingwei commented Nov 8, 2024

@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模式安装后初始化添加物理机正常,但是不确定和你的步骤是否一致。
image

以下是我使用的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]#

@ayo19900212
Copy link
Author

ayo19900212 commented Nov 8, 2024

image
image
@yuxingwei

@yuxingwei
Copy link

yuxingwei commented Nov 8, 2024

image image @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

image

@ayo19900212
Copy link
Author

ok,多谢,我试试 @yuxingwei

@ayo19900212
Copy link
Author

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用户也不行

@ayo19900212
Copy link
Author

"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"
]
}

@zhangzp0127
Copy link

ZStack-Cloud-x86_64-DVD-5.3.0-h84r.iso在平台添加物理机的时候遇到同样问题。我的物理机是之前装好系统的,ubuntu-20.04.6-desktop-amd64.iso

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

3 participants