Skip to content

prepare-image doesn't support alpine linux #17

Description

@Smithx10

https://github.com/joyent/sdc-imgapi/blob/master/tools/prepare-image/linux-prepare-image

Doesn't work with alpine.

Workflow errors out:

cnapi.poll_task
{"message":"prepare-image script error while preparing VM ebd8367a-11de-c549-cce8-e5bb811264f2:\n ...\n [2019-08-15T04:12:06Z] :34: export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\n [2019-08-15T04:12:06Z] :34: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\n [2019-08-15T04:12:06Z] :39: trap 'errexit $?' EXIT\n [2019-08-15T04:12:06Z] :244: /usr/sbin/mdata-put prepare-image:state running\n [2019-08-15T04:12:06Z] :248: [[ -f /etc/os-release ]]\n [2019-08-15T04:12:06Z] :249: . /etc/os-release\n [[2019-08-15T04:12:06Z] :1: NAME='Alpine Linux'\n [[2019-08-15T04:12:06Z] :2: ID=alpine\n [[2019-08-15T04:12:06Z] :3: VERSION_ID=3.10.1\n [[2019-08-15T04:12:06Z] :4: PRETTY_NAME='Alpine Linux v3.10'\n [[2019-08-15T04:12:06Z] :5: HOME_URL=https://alpinelinux.org/\n [[2019-08-15T04:12:06Z] :6: BUG_REPORT_URL=https://bugs.alpinelinux.org/\n [2019-08-15T04:12:06Z] :250: [[ alpine == \c\e\n\t\o\s ]]\n [2019-08-15T04:12:06Z] :252: [[ alpine == \d\e\b\i\a\n ]]\n [2019-08-15T04:12:06Z] :254: [[ alpine == \f\e\d\o\r\a ]]\n [2019-08-15T04:12:06Z] :256: [[ alpine == \u\b\u\n\t\u ]]\n [2019-08-15T04:12:06Z] :267: reset_provision_status\n [2019-08-15T04:12:06Z] :235: reset_provision_status(): [[ -f /var/svc/provision_success ]]\n [2019-08-15T04:12:06Z] :236: reset_provision_status(): rm -f /var/svc/provision_success\n [2019-08-15T04:12:06Z] :268: prepare_lib_smartdc\n [2019-08-15T04:12:06Z] :223: prepare_lib_smartdc(): [[ -d /lib/smartdc ]]\n [2019-08-15T04:12:06Z] :226: prepare_lib_smartdc(): rm -f /lib/smartdc/.firstboot-complete-do-not-delete\n [2019-08-15T04:12:06Z] :229: prepare_lib_smartdc(): chown -R root:root /lib/smartdc\n [2019-08-15T04:12:06Z] :269: cleanup_logs\n [2019-08-15T04:12:06Z] :75: cleanup_logs(): find /var/log -type f -exec sh -c '>{}' ';'\n [2019-08-15T04:12:06Z] :270: cleanup_disks\n [2019-08-15T04:12:06Z] :114: cleanup_disks(): echo 'removing /dev/vdb and cloud-init entries from fstab'\n [2019-08-15T04:12:06Z] :115: cleanup_disks(): sed -i -e '/^\/dev\/vdb/d' -e '/[\t|,]comment=cloudconfig[,|\t]/d' /etc/fstab\n [2019-08-15T04:12:06Z] :271: cleanup_ssh\n [2019-08-15T04:12:06Z] :110: cleanup_ssh(): find /etc/ssh -type f -name 'ssh_host_'\n [2019-08-15T04:12:06Z] :110: cleanup_ssh(): xargs rm -f\n [2019-08-15T04:12:06Z] :272: cleanup_root\n [2019-08-15T04:12:06Z] :98: cleanup_root(): history -c\n [2019-08-15T04:12:06Z] :99: cleanup_root(): history -w\n [2019-08-15T04:12:06Z] :99: cleanup_root(): true\n [[2019-08-15T04:12:06Z] :103: cleanup_root(): mdata_get_pi root-password-hash\n [[2019-08-15T04:12:06Z] :66: mdata_get_pi(): typeset key=root-password-hash\n [[2019-08-15T04:12:06Z] :68: mdata_get_pi(): mdata-get prepare-image:root-password-hash\n [[2019-08-15T04:12:06Z] :68: mdata_get_pi(): true\n [2019-08-15T04:12:06Z] :103: cleanup_root(): usermod -p '' root\n [2019-08-15T04:12:06Z] :1: cleanup_root(): errexit 127\n [2019-08-15T04:12:06Z] :49: errexit(): set +o xtrace\n ","name":"WError","stack":"PrepareImageError: prepare-image script error while preparing VM ebd8367a-11de-c549-cce8-e5bb811264f2:\n ...\n [2019-08-15T04:12:06Z] :34: export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\n [2019-08-15T04:12:06Z] :34: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games\n [2019-08-15T04:12:06Z] :39: trap 'errexit $?' EXIT\n [2019-08-15T04:12:06Z] :244: /usr/sbin/mdata-put prepare-image:state running\n [2019-08-15T04:12:06Z] :248: [[ -f /etc/os-release ]]\n [2019-08-15T04:12:06Z] :249: . /etc/os-release\n [[2019-08-15T04:12:06Z] :1: NAME='Alpine Linux'\n [[2019-08-15T04:12:06Z] :2: ID=alpine\n [[2019-08-15T04:12:06Z] :3: VERSION_ID=3.10.1\n [[2019-08-15T04:12:06Z] :4: PRETTY_NAME='Alpine Linux v3.10'\n [[2019-08-15T04:12:06Z] :5: HOME_URL=https://alpinelinux.org/\n [[2019-08-15T04:12:06Z] :6: BUG_REPORT_URL=https://bugs.alpinelinux.org/\n [2019-08-15T04:12:06Z] :250: [[ alpine == \c\e\n\t\o\s ]]\n [2019-08-15T04:12:06Z] :252: [[ alpine == \d\e\b\i\a\n ]]\n [2019-08-15T04:12:06Z] :254: [[ alpine == \f\e\d\o\r\a ]]\n [2019-08-15T04:12:06Z] :256: [[ alpine == \u\b\u\n\t\u ]]\n [2019-08-15T04:12:06Z] :267: reset_provision_status\n [2019-08-15T04:12:06Z] :235: reset_provision_status(): [[ -f /var/svc/provision_success ]]\n [2019-08-15T04:12:06Z] :236: reset_provision_status(): rm -f /var/svc/provision_success\n [2019-08-15T04:12:06Z] :268: prepare_lib_smartdc\n [2019-08-15T04:12:06Z] :223: prepare_lib_smartdc(): [[ -d /lib/smartdc ]]\n [2019-08-15T04:12:06Z] :226: prepare_lib_smartdc(): rm -f /lib/smartdc/.firstboot-complete-do-not-delete\n [2019-08-15T04:12:06Z] :229: prepare_lib_smartdc(): chown -R root:root /lib/smartdc\n [2019-08-15T04:12:06Z] :269: cleanup_logs\n [2019-08-15T04:12:06Z] :75: cleanup_logs(): find /var/log -type f -exec sh -c '>{}' ';'\n [2019-08-15T04:12:06Z] :270: cleanup_disks\n [2019-08-15T04:12:06Z] :114: cleanup_disks(): echo 'removing /dev/vdb and cloud-init entries from fstab'\n [2019-08-15T04:12:06Z] :115: cleanup_disks(): sed -i -e '/^\/dev\/vdb/d' -e '/[\t|,]comment=cloudconfig[,|\t]/d' /etc/fstab\n [2019-08-15T04:12:06Z] :271: cleanup_ssh\n [2019-08-15T04:12:06Z] :110: cleanup_ssh(): find /etc/ssh -type f -name 'ssh_host_'\n [2019-08-15T04:12:06Z] :110: cleanup_ssh(): xargs rm -f\n [2019-08-15T04:12:06Z] :272: cleanup_root\n [2019-08-15T04:12:06Z] :98: cleanup_root(): history -c\n [2019-08-15T04:12:06Z] :99: cleanup_root(): history -w\n [2019-08-15T04:12:06Z] :99: cleanup_root(): true\n [[2019-08-15T04:12:06Z] :103: cleanup_root(): mdata_get_pi root-password-hash\n [[2019-08-15T04:12:06Z] :66: mdata_get_pi(): typeset key=root-password-hash\n [[2019-08-15T04:12:06Z] :68: mdata_get_pi(): mdata-get prepare-image:root-password-hash\n [[2019-08-15T04:12:06Z] :68: mdata_get_pi(): true\n [2019-08-15T04:12:06Z] :103: cleanup_root(): usermod -p '' root\n [2019-08-15T04:12:06Z] :1: cleanup_root(): errexit 127\n [2019-08-15T04:12:06Z] :49: errexit(): set +o xtrace\n \n at /usr/img/lib/imgadm.js:3767:26\n at done (/usr/img/lib/common.js:601:17)\n at /usr/img/node_modules/async/lib/async.js:729:17\n at /usr/img/lib/common.js:587:21\n at /usr/img/lib/common.js:532:13\n at ChildProcess.exithandler (child_process.js:635:7)\n at ChildProcess.EventEmitter.emit (events.js:98:17)\n at maybeClose (child_process.js:743:16)\n at Process.ChildProcess._handle.onexit (child_process.js:810:5)","code":"PrepareImageError"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions