well. Add in additional GCE guest package into manifests (init files
were split into their own package to make the python package adhere to
pypi standards).
The way boot options for linux and config params for grub
were configured gave rise to quite a few bugs.
The configuration has now been abstracted so that
options can be added without interfering with the work
of other tasks (no more sed_i!)
Up until now I didn't see the point of using spaces for indentation.
However, the previous commit (a18bec3) was quite eye opening.
Given that python is an indentation aware language, the amount of
mistakes that went unnoticed because tabs and spaces were used
at the same time (tabs for indentation and spaces for alignment)
were unacceptable.
E101,W191 have been re-enable in the tox flake8 checker and
the documentation has been modified accordingly.
The following files have been left as-is:
* bootstrapvz/common/assets/extlinux/extlinux.conf
* bootstrapvz/common/assets/init.d/expand-root
* bootstrapvz/common/assets/init.d/generate-ssh-hostkeys
* bootstrapvz/common/assets/init.d/squeeze/generate-ssh-hostkeys
* bootstrapvz/plugins/docker_daemon/assets/init.d/docker
* bootstrapvz/providers/ec2/assets/bin/growpart
* bootstrapvz/providers/ec2/assets/grub.d/40_custom
* bootstrapvz/providers/ec2/assets/init.d/ec2-get-credentials
* bootstrapvz/providers/ec2/assets/init.d/ec2-run-user-data
* docs/_static/taskoverview.coffee
* docs/_static/taskoverview.less
* tests/unit/subprocess.sh
We were hard coding an image name format for GCE, but that doesn't match
what other providers (e.g. AWS) do.
Given that image upload did not work at all previously, no reason to
preserve the existing unusual behaviour.
An environment with AF_INET6 sockets but no loopback interface creates
nothing but pain.
If an IPv4 server binds to 0.0.0.0:8080, clients may connect to
0.0.0.0:8080, which automatically picks 127.0.0.1 as a source address.
However, when a server binds to [::]:8080, the absence of ::1 causes
clients to fail with ENETUNREACH.
For a demonstration, run the following in a python shell:
import socket
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0)
s.bind(("", 0))
print s.getsockname() # Example: ('::', 39079, 0, 0)
s.listen(10)
c = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0)
c.connect(s.getsockname())
print c.getsockname(), c.getpeername()
This yields the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 101] Network is unreachable
All provider specific settings have been moved to the
provider section. The image name itself is now located
at the top level and called "name". It is required for all providers.
This commit adds the cloud-initramfs-growroot package to the
installation list for GCE images with backports enabled, and updates
the gce tasklist to add the /etc/init.d/expand-root script
(with provider-appropriate touch-ups) to the image.
This ensures that preferences are written before apt update and also ensures
that in GCE the backports are added to the sources before the provider-specific
SetPackageRepositories happens.
Change-Id: I3c85f922c49c2a6fbd3c0f2bad1072eff0d098c8
This DHCP exit hook to shorten the system hostname on GCE was previously
installed by build-debian-cloud and bootstrap-vz, but seems to have been
inadvertently removed in commit c81045cc6e
as part of a broad cross-cloud cleanup. Again, this was caught by our
validation tests, and we might be done with the fixes at this point.
In this commit, I'm reinstating the hook with a name change and an
explanatory comment, to reduce the risk of this vanishing accidentally
in the future.
Change-Id: I4e7268f8b9ab3b2a7fc8b510898c6fbdd685aa53
- GCE provider wasn't including the GCE SetHostname task, without which
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604883 was
preventing the hostname from getting set after reboot.
- During the GCE build, one of the GCE cleaning tasks was trying to run
an apt-get update after the build-time resolv.conf file was removed.
Fix this ordering by moving the network.Remove* tasks to the
system_cleaning phase as they should have been all along, and adding
an appropriate ordering rule for the GCE cleaning task.
- Add the fallback http.debian.net mirror after, not before, our mirror.
- The puppet plugin's ApplyPuppetManifest task specified that it should
run before the network.Remove* tasks within the system_modification
phase. Now that those tasks have been moved to a later phase
(system_cleaning), remove this dependency. I have no puppet manifest
to test this change, but am including it in hopes of avoiding a
breakage there. Hopefully someone who uses puppet can test this or at
least confirm that it's correct.
Change-Id: Ieca97f288f456bab119989f4cbc4c3993a755830
GCE's `tasks.apt.SetPackageRepositories` was adding duplicated entries
to apt `info.source_lists`, even ignoring the package mirror specified
on manifest.
GCE also gets its own file.
For now, this scales - but we might want to refactor when there is more that just the kernel package we need to choose from