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

[Linux] Support autoinstall for Kylin Server 10 #534

Merged
merged 28 commits into from
Jan 30, 2024

Conversation

ZouYuhua
Copy link
Collaborator

Passed the test without open-vm-tools:
image

@ZouYuhua
Copy link
Collaborator Author

This is new merge request to replace the old one #533 to avoid the warning message about unsigned commit from rebase. Thanks

@ZouYuhua
Copy link
Collaborator Author

I will add more ansible testcases in other ticket and then modify README.md to declaring support Kylin Server 10. Thanks.

@keirazhang keirazhang changed the title support autoinstall for Kylin Server 10 [Linux] Support autoinstall for Kylin Server 10 Jan 18, 2024
@Tomorrow9 Tomorrow9 added this to the 3.1 milestone Jan 19, 2024
common/get_guest_system_info.yml Outdated Show resolved Hide resolved
common/get_guest_system_info.yml Outdated Show resolved Hide resolved
autoinstall/README.md Outdated Show resolved Hide resolved
@ZouYuhua
Copy link
Collaborator Author

Hi Qi,
It's on-onging testing and the changes will continue. I will give you message after testing is done and no more changes from me is needed. Then you can help me review the changes. Thanks very much.

Best regards
Yuhua Zou

@keirazhang keirazhang changed the title [Linux] Support autoinstall for Kylin Server 10 WIP: [Linux] Support autoinstall for Kylin Server 10 Jan 24, 2024
@keirazhang
Copy link
Contributor

If it is not ready for review, please add WIP: in your pull request subject in future. Thanks!

@ZouYuhua ZouYuhua force-pushed the fix_zouy_kylin_server_v10_autoinstall branch from 535814a to 7518bb8 Compare January 25, 2024 02:31
@ZouYuhua
Copy link
Collaborator Author

The following 3 ansible testcases are failed and the others passed:

  1. gosc_cloudinit_dhcp and gosc_cloudinit_dhcp
    cause:
    the cloud-init version is 19.4 and not found directory /etc/cloud/templates/

    detailed message:
    task path: /home/worker/workspace/zyh_Ansible_Kylin_Server_V10_MAIN_PARAVIRTUAL_VMXNET3_EFI/ansible-vsphere-gos-validation/linux/guest_customization/linux_gosc_start.yml:28
    fatal: [localhost -> 10.92.4.21]: FAILED! => {
    "changed": true,
    "cmd": "cat "/etc/cloud/templates/hosts.redhat.tmpl" | grep '.*fqdn}} .hostname}}.' | awk '{ print $1 }'",
    "delta": "0:00:00.007391",
    "end": "2024-01-25 00:10:40.876338",
    "failed_when_result": true,
    "invocation": {
    "module_args": {
    "_raw_params": "cat "/etc/cloud/templates/hosts.redhat.tmpl" | grep '.*fqdn}} .hostname}}.' | awk '{ print $1 }'",
    "_uses_shell": true,
    "argv": null,
    "chdir": null,
    "creates": null,
    "executable": null,
    "removes": null,
    "stdin": null,
    "stdin_add_newline": true,
    "strip_empty_ends": true
    }
    },
    "msg": "",
    "rc": 0,
    "start": "2024-01-25 00:10:40.868947",
    "stderr": "cat: /etc/cloud/templates/hosts.redhat.tmpl: No such file or directory",
    "stderr_lines": [
    "cat: /etc/cloud/templates/hosts.redhat.tmpl: No such file or directory"
    ],
    "stdout": "",
    "stdout_lines": [],
    "warnings": [
    "Platform linux on host localhost is using the discovered Python interpreter at /usr/bin/python3.7, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for more information."
    ]
    }

  1. ovt_verify_install
    cause:
    No open-vm-tools package in both online repo and ISO file for Kylin Advanced Server V10 SP1 & SP2.
    We can find the open-vm-tools package in online repo for Kylin Advanced Server V10 SP3.1

@ZouYuhua ZouYuhua changed the title WIP: [Linux] Support autoinstall for Kylin Server 10 [Linux] Support autoinstall for Kylin Server 10 Jan 25, 2024
@ZouYuhua
Copy link
Collaborator Author

ZouYuhua commented Jan 25, 2024

The following 3 ansible testcases are failed and the others passed:

1. gosc_cloudinit_dhcp and gosc_cloudinit_dhcp
   **cause:**
   the cloud-init version is 19.4 and not found directory /etc/cloud/templates/
   **detailed message:**
   task path: /home/worker/workspace/zyh_Ansible_Kylin_Server_V10_MAIN_PARAVIRTUAL_VMXNET3_EFI/ansible-vsphere-gos-validation/linux/guest_customization/linux_gosc_start.yml:28
   fatal: [localhost -> 10.92.4.21]: FAILED! => {
   "changed": true,
   "cmd": "cat "/etc/cloud/templates/hosts.redhat.tmpl" | grep '.*fqdn}} ._hostname}}._' | awk '{ print $1 }'",
   "delta": "0:00:00.007391",
   "end": "2024-01-25 00:10:40.876338",
   "failed_when_result": true,
   "invocation": {
   "module_args": {
   "_raw_params": "cat "/etc/cloud/templates/hosts.redhat.tmpl" | grep '.*fqdn}} ._hostname}}._' | awk '{ print $1 }'",
   "_uses_shell": true,
   "argv": null,
   "chdir": null,
   "creates": null,
   "executable": null,
   "removes": null,
   "stdin": null,
   "stdin_add_newline": true,
   "strip_empty_ends": true
   }
   },
   "msg": "",
   "rc": 0,
   "start": "2024-01-25 00:10:40.868947",
   "stderr": "cat: /etc/cloud/templates/hosts.redhat.tmpl: No such file or directory",
   "stderr_lines": [
   "cat: /etc/cloud/templates/hosts.redhat.tmpl: No such file or directory"
   ],
   "stdout": "",
   "stdout_lines": [],
   "warnings": [
   "Platform linux on host localhost is using the discovered Python interpreter at /usr/bin/python3.7, but future installation of another Python interpreter could change the meaning of that path. See https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for more information."
   ]
   }


2. ovt_verify_install
   cause:
   No open-vm-tools package in both online repo and ISO file for Kylin Advanced Server V10 SP1 & SP2.
   We can find the open-vm-tools package in online repo for Kylin Advanced Server V10 SP3.1

@keirazhang
Hi Qi,
code is ready for you review.
Any comment for the upper failed testcases ? Thanks very much.

README.md Outdated Show resolved Hide resolved
autoinstall/README.md Outdated Show resolved Hide resolved
linux/utils/install_uninstall_package.yml Outdated Show resolved Hide resolved
@keirazhang
Copy link
Contributor

keirazhang commented Jan 25, 2024

  1. About cloud-init GOSC, please firstly manually execute the two cases to check whether cloud-init GOSC works. If it works, we then decide how to fix the issue of /etc/cloud/templates/hosts.redhat.tmpl not exists in our test cases. Otherwise, request CS2C rebase cloud-init to a latest version.
  2. About ovt_verify_install, to validate V10 SP1& SP2, you can set linux_ovt_repo_url in vars/test.yml with SP3 repo https://update.cs2c.com.cn/NS/V10/V10SP3.1/os/adv/lic/base/x86_64/ when you or OS vendor test it. This is a workaround. In future, we should suggest OS vendor put open-vm-tools packages in their ISO image or release online repo.

@ZouYuhua ZouYuhua changed the title [Linux] Support autoinstall for Kylin Server 10 [WIP][Linux] Support autoinstall for Kylin Server 10 Jan 29, 2024
Signed-off-by: ZouYuhua <[email protected]>
Signed-off-by: ZouYuhua <[email protected]>
@ZouYuhua ZouYuhua changed the title [WIP][Linux] Support autoinstall for Kylin Server 10 [Linux] Support autoinstall for Kylin Server 10 Jan 29, 2024
autoinstall/Kylin/Server/10/ks.cfg Outdated Show resolved Hide resolved
linux/utils/enable_auto_login.yml Outdated Show resolved Hide resolved
Signed-off-by: ZouYuhua <[email protected]>
@ZouYuhua
Copy link
Collaborator Author

Test result:

image

After code change to fix issue of testcase ovt_verify_status

  1. for existing VM:
image
  1. for new deploy VM:
image

Signed-off-by: ZouYuhua <[email protected]>
Copy link
Contributor

@keirazhang keirazhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@keirazhang keirazhang merged commit 4efd99c into vmware:main Jan 30, 2024
@ZouYuhua ZouYuhua deleted the fix_zouy_kylin_server_v10_autoinstall branch January 31, 2024 06:20
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

Successfully merging this pull request may close these issues.

3 participants