mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

- 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
58 lines
1.8 KiB
Python
58 lines
1.8 KiB
Python
from bootstrapvz.common import task_groups
|
|
import tasks.apt
|
|
import tasks.boot
|
|
import tasks.configuration
|
|
import tasks.image
|
|
import tasks.host
|
|
import tasks.packages
|
|
from bootstrapvz.common.tasks import apt
|
|
from bootstrapvz.common.tasks import loopback
|
|
from bootstrapvz.common.tasks import initd
|
|
from bootstrapvz.common.tasks import ssh
|
|
from bootstrapvz.common.tasks import volume
|
|
|
|
|
|
def initialize():
|
|
pass
|
|
|
|
|
|
def validate_manifest(data, validator, error):
|
|
import os.path
|
|
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
|
validator(data, schema_path)
|
|
|
|
|
|
def resolve_tasks(taskset, manifest):
|
|
taskset.update(task_groups.get_standard_groups(manifest))
|
|
|
|
taskset.update([apt.AddBackports,
|
|
loopback.AddRequiredCommands,
|
|
loopback.Create,
|
|
tasks.apt.SetPackageRepositories,
|
|
tasks.apt.ImportGoogleKey,
|
|
tasks.packages.DefaultPackages,
|
|
tasks.packages.GooglePackages,
|
|
tasks.packages.InstallGSUtil,
|
|
|
|
tasks.configuration.GatherReleaseInformation,
|
|
|
|
tasks.host.DisableIPv6,
|
|
tasks.host.SetHostname,
|
|
tasks.boot.ConfigureGrub,
|
|
initd.InstallInitScripts,
|
|
ssh.AddSSHKeyGeneration,
|
|
tasks.apt.CleanGoogleRepositoriesAndKeys,
|
|
|
|
loopback.MoveImage,
|
|
tasks.image.CreateTarball,
|
|
volume.Delete,
|
|
])
|
|
|
|
if 'gcs_destination' in manifest.image:
|
|
taskset.add(tasks.image.UploadImage)
|
|
if 'gce_project' in manifest.image:
|
|
taskset.add(tasks.image.RegisterImage)
|
|
|
|
|
|
def resolve_rollback_tasks(taskset, manifest, completed, counter_task):
|
|
taskset.update(task_groups.get_standard_rollback_tasks(completed))
|