Closed spokofono closed 4 years ago
I've got some new foundings:
- name: root
lock_passwd: false
passwd: "$1$saltedpassword"
Saltedpassword generated throuh openssl password -1 -salt saltsalt password
. Still root password remains empty.
Error: Error creating HuaweiCloudStack server: Resource not found: [POST https://ecs-endpoint/v2/2849a2f26ff845d288b00155e32af891/os-volumes_boot], error message: {"itemNotFound": {"message": "Volume f4a1a63b-3cc6-4976-a41f-8d5f84cc3b54 could not be found.", "code": 404}}
On next run terraform refreshes volumes and then the volume will be created. But this is not directly connected with my issue.
Now trying to find out how cloudinit differs between ubuntu and centos.
@spokofono sorry for late. Please feel free about the warning message in logging. The issue was caused by cloudinit or your images, you can get help form the technical support of HCS.
Also you can raise another issue and give more details about the error message: "Volume f4a1a63b-3cc6-4976-a41f-8d5f84cc3b54 could not be found."
thanks!
Hi ShiChangkuo,
Thanks for your response. You are right, I found a problem in cloud-init. Quick solution - use config_drive: true within a instance
Reason: Without config_drive: true an instance is trying to get config from network. Builtin version of cloudinit in newest centos has bug:
failed run of stage init
------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 652, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 362, in main_init
init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 649, in apply_network_config
netcfg, src = self._find_networking_config()
File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 636, in _find_networking_config
if self.datasource and hasattr(self.datasource, 'network_config'):
File "/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceOpenStack.py", line 115, in network_config
self.network_json, known_macs=None)
File "/usr/lib/python3.6/site-packages/cloudinit/sources/helpers/openstack.py", line 645, in convert_net_json
'Unknown network_data link type: %s' % link['type'])
ValueError: Unknown network_data link type: cascading
The newest centos has builtin version 18.5, but ubuntu has 20.1 and there is this bug solved, so cloudinit run without errors.
The reason why I was able to start instance manually through console is that huawei's openstack use configdrive module, not network. So the finding with cdrom was actually solution.
So there are two options:
Sorry for bothering you.
Thank you.
Terraform Version
Terraform Configuration Files
and the user-data.yml:
Debug Output
Problems I found in debug:
Instance was created:
But on the end there is a WARN:
Crash Output
There is no crash, instance is created.
Expected Behavior
I can login with ssh key.
Actual Behavior
I can't login with ssh key.
Notes
If I create instance manually with same key, I can login without problems. I tried centos8 and centos7 with same result. It seems that whatever I write in user-data.yml has no impact on instance. Interesting is that webconsole show correct key on instance.
What can I do now?
Thank you for help.