Bug 1212152
| Summary: | virt-builder firstboot-command fails: File name too long | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Richard W.M. Jones <rjones> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | kchamart, ptoscano, rbalakri |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-04-27 15:22:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Richard W.M. Jones
2015-04-15 16:24:49 UTC
Pushed upstream in 1.29.38. Can confirm 1.29.41 works. Tested with: libguestfs-1.29.41-1.fc23
Test
----
$ virt-builder fedora-21 \
[. . .]
--firstboot-command '
# Create the user account.
useradd -m -p "" -G wheel stack
chage -d 0 stack
chmod 0755 /home/stack
mkdir -m 0755 /home/stack/.ssh
cp /var/tmp/authorized_keys /home/stack/.ssh/
chown -R stack.stack /home/stack/.ssh
# Enable some services to not break DevStack restart
systemctl enable openvswitch mariadb rabbitmq-server httpd
'
Before applying the fix, tested with '1.28.9-1.fc21'
---------------------------------------------------
[. . .]
virt-builder: error: libguestfs error: internal_write: open:
/usr/lib/virt-sysprep/scripts/0001---------Create-the-user-account-------useradd--m--p-----G-wheel-stack------chage--d-0-stack------chmod-0755--home-stack------mkdir--m-0755--home-stack--ssh------cp--var-tmp-authorized_keys--home-stack--ssh-------chown--R-stack-stack--home-stack--ssh--------Enable-some-services-to-not-break-DevStack-restart------systemctl-enable-openvswitch-mariadb-rabbitmq-server-httpd-----:
File name too long
[. . .]
After applying 'libguestfs-1.29.41-1.fc23'
------------------------------------------
The same "--first-command" completes successfully:
$ virt-builder fedora-21\
[. . .]
[1711.0] Installing firstboot command:
# Create the user account.
useradd -m -p "" -G wheel stack
chage -d 0 stack
chmod 0755 /home/stack
mkdir -m 0755 /home/stack/.ssh
cp /var/tmp/authorized_keys /home/stack/.ssh/
chown -R stack.stack /home/stack/.ssh
# Enable some services to not break DevStack restart
systemctl enable openvswitch mariadb rabbitmq-server httpd
[1711.0] Setting passwords
[1714.0] SELinux relabelling
[1714.0] Finishing off
Output file: /export/vmimages/devstack1.qcow2
Output size: 40.0G
Output format: qcow2
Total usable space: 38.6G
Free space: 37.3G (96%)
|