[libvirt] [jenkins-ci] guests: Add support for openSUSE Leap 15.1

Jim Fehlig jfehlig at suse.com
Tue Nov 19 00:38:17 UTC 2019


On 11/18/19 5:21 PM, Jim Fehlig wrote:
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
>   guests/configs/autoinst.xml                   | 86 +++++++++++++++++++
>   .../libvirt-opensuse-15.1/docker.yml          |  2 +
>   .../libvirt-opensuse-15.1/install.yml         |  2 +
>   .../host_vars/libvirt-opensuse-15.1/main.yml  | 22 +++++
>   guests/inventory                              |  1 +
>   guests/lcitool                                |  2 +
>   guests/vars/mappings.yml                      | 38 +++++++-
>   7 files changed, 151 insertions(+), 2 deletions(-)
> 
> diff --git a/guests/configs/autoinst.xml b/guests/configs/autoinst.xml
> new file mode 100644
> index 0000000..9b93a29
> --- /dev/null
> +++ b/guests/configs/autoinst.xml
> @@ -0,0 +1,86 @@
> +<?xml version="1.0"?>
> +<!DOCTYPE profile>
> +<profile
> +  xmlns="http://www.suse.com/1.0/yast2ns"
> +  xmlns:config="http://www.suse.com/1.0/configns">
> +  <general>
> +    <mode>
> +      <confirm config:type="boolean">false</confirm>
> +    </mode>
> +  </general>
> +  <partitioning config:type="list">
> +    <drive>
> +      <device>/dev/vda</device>
> +      <use>all</use>
> +      <partitions config:type="list">
> +        <partition>
> +          <filesystem config:type="symbol">swap</filesystem>
> +          <size>500M</size>
> +          <mount>swap</mount>
> +        </partition>
> +        <partition>
> +          <filesystem config:type="symbol">ext4</filesystem>
> +          <mount>/</mount>
> +          <size>max</size>
> +        </partition>
> +      </partitions>
> +    </drive>
> +  </partitioning>
> +  <timezone>
> +    <hwclock>UTC</hwclock>
> +    <timezone>UTC</timezone>
> +  </timezone>
> +  <add-on>
> +    <add_on_products config:type="list">
> +      <listentry>
> +        <media_url>http://download.opensuse.org/distribution/leap/15.1/repo/oss/</media_url>
> +        <name>repo-oss</name>
> +      </listentry>
> +      <listentry>
> +        <media_url>http://download.opensuse.org/update/leap/15.1/oss</media_url>
> +        <name>repo-update</name>
> +      </listentry>
> +      <listentry>
> +        <media_url>http://download.opensuse.org/distribution/leap/15.1/repo/non-oss/</media_url>
> +        <name>repo-non-oss</name>
> +      </listentry>
> +      <listentry>
> +        <media_url>http://download.opensuse.org/update/leap/15.1/non-oss/</media_url>
> +        <name>repo-update-non-oss</name>
> +      </listentry>
> +    </add_on_products>
> +  </add-on>
> +  <software>
> +    <install_recommended config:type="boolean">false</install_recommended>
> +      <patterns config:type="list">
> +      <pattern>base</pattern>
> +      <pattern>minimal_base</pattern>
> +      <pattern>yast2_basis</pattern>
> +    </patterns>
> +  </software>
> +  <networking>
> +    <keep_install_network config:type="boolean">true</keep_install_network>
> +  </networking>
> +  <users config:type="list">
> +    <user>
> +      <username>root</username>
> +      <user_password>root</user_password>
> +      <encrypted config:type="boolean">false</encrypted>
> +      <uid>0</uid>
> +      <gid>0</gid>
> +      <home>/root</home>
> +      <shell>/bin/bash</shell>
> +    </user>
> +  </users>
> +  <services-manager>
> +    <default_target>multi-user</default_target>
> +    <services>
> +      <enable config:type="list">
> +        <service>sshd</service>
> +      </enable>
> +    </services>
> +  </services-manager>
> +  <firewall>
> +    <enable_firewall>true</enable_firewall>

This should be 'false', or perhaps excluded altogether.

BTW, with this patch applied (and some workarounds for problems on my end) I'm 
able to successfully install the guest with 'lcitool install', but update needs 
some work

# ./lcitool update libvirt-opensuse-151 libvirt

PLAY [all] 
*****************************************************************************************************
included: 
/home/jfehlig/virt/upstream/libvirt-jenkins-ci/guests/playbooks/update/tasks/bootstrap.yml 
for libvirt-opensuse-151

TASK [set_fact] 
************************************************************************************************
ok: [libvirt-opensuse-151]

TASK [Bootstrap Ansible] 
***************************************************************************************
changed: [libvirt-opensuse-151]

PLAY [all] 
*****************************************************************************************************

TASK [Gathering Facts] 
*****************************************************************************************
ok: [libvirt-opensuse-151]
included: 
/home/jfehlig/virt/upstream/libvirt-jenkins-ci/guests/playbooks/update/tasks/base.yml 
for libvirt-opensuse-151

TASK [Update installed packages] 
*******************************************************************************
ok: [libvirt-opensuse-151]

TASK [Clean up packages after update] 
**************************************************************************
fatal: [libvirt-opensuse-151]: FAILED! => {"changed": true, "cmd": "zypper clean 
packages -y && zypper autoremove -y", "delta": "0:00:00.069846", "end": 
"2019-11-19 00:29:38.579176", "msg": "non-zero return code", "rc": 2, "start": 
"2019-11-19 00:29:38.509330", "stderr": "Repository 'packages' not found by its 
alias, number, or URI.\nRepository '-y' not found by its alias, number, or 
URI.\nUnknown command 'autoremove'", "stderr_lines": ["Repository 'packages' not 
found by its alias, number, or URI.", "Repository '-y' not found by its alias, 
number, or URI.", "Unknown command 'autoremove'"], "stdout": "Use 'zypper repos' 
to get the list of defined repositories.\nAll repositories have been cleaned 
up.\nType 'zypper help' to get a list of global options and commands.\n\nIn case 
'autoremove' is not a typo it's probably not a built-in command, but provided as 
a subcommand or plug-in (see 'zypper help subcommand').\nIn this case a specific 
package providing the subcommand needs to be installed first. Those packages are 
often named 'zypper-autoremove' or 'zypper-autoremove-plugin'.", "stdout_lines": 
["Use 'zypper repos' to get the list of defined repositories.", "All 
repositories have been cleaned up.", "Type 'zypper help' to get a list of global 
options and commands.", "", "In case 'autoremove' is not a typo it's probably 
not a built-in command, but provided as a subcommand or plug-in (see 'zypper 
help subcommand').", "In this case a specific package providing the subcommand 
needs to be installed first. Those packages are often named 'zypper-autoremove' 
or 'zypper-autoremove-plugin'."]}

PLAY RECAP 
*****************************************************************************************************
libvirt-opensuse-151       : ok=6    changed=1    unreachable=0    failed=1 
skipped=9    rescued=0    ignored=0

./lcitool: Failed to run update on 'libvirt-opensuse-151': Command 
'['/usr/bin/ansible-playbook', '--limit', 'libvirt-opensuse-151', 
'--extra-vars', '{"selected_projects": ["libvirt"], "git_remote": "default", 
"root_password_file": "/root/.config/lcitool/root-password", "playbook_base": 
"/home/jfehlig/virt/upstream/libvirt-jenkins-ci/guests/playbooks/update", 
"base": "/home/jfehlig/virt/upstream/libvirt-jenkins-ci/guests", "git_branch": 
"master", "flavor": "test"}', 
'/home/jfehlig/virt/upstream/libvirt-jenkins-ci/guests/playbooks/update/main.yml']' 
returned non-zero exit status 2

Looks like I'll need to do some work in the package manager code for zypper.

Regards,
Jim




More information about the libvir-list mailing list