Commit 2640d4e6 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Merge branch 'master' into develop

Conflicts:
	image_creator/version.py
	version
parents 2bf33bd0 35fc643e
2016-10-12, v0.10.2
* Assign correct content type when uploading images
2016-09-27, v0.10.1
* Clear /etc/machine-id instead of removing it
......
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 GRNET S.A.
# Copyright (C) 2011-2016 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -176,7 +176,7 @@ def upload_image(session):
with image.raw_device() as raw:
with open(raw, 'rb') as f:
cloud["uploaded"] = \
kamaki.upload(f, image.size, name, container,
kamaki.upload(f, image.size, name, container, None,
"Calculating block hashes",
"Uploading missing blocks")
# Upload md5sum file
......
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 GRNET S.A.
# Copyright (C) 2011-2016 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -477,9 +477,10 @@ def create_image(session, answers):
time.strftime("%Y%m%d%H%M"))
with image.raw_device() as raw:
with open(raw, 'rb') as device:
remote = kamaki.upload(device, image.size, name, CONTAINER,
"(1/3) Calculating block hashes",
"(2/3) Uploading image blocks")
remote = kamaki.upload(
device, image.size, name, CONTAINER, None,
"(1/3) Calculating block hashes",
"(2/3) Uploading image blocks")
image.out.info("(3/3) Uploading md5sum file ...", False)
md5sumstr = '%s %s\n' % (session['checksum'], name)
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 GRNET S.A.
# Copyright (C) 2011-2016 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -448,9 +448,10 @@ def image_creator(options, out):
with image.raw_device() as raw:
with open(raw, 'rb') as f:
remote = kamaki.upload(
f, image.size, options.upload, options.container,
"(1/3) Calculating block hashes",
"(2/3) Uploading missing blocks")
f, image.size, options.upload,
options.container, None,
"(1/3) Calculating block hashes",
"(2/3) Uploading missing blocks")
out.info("(3/3) Uploading md5sum file ...", False)
md5sumstr = '%s %s\n' % (checksum,
......
......@@ -337,12 +337,15 @@ class Linux(Unix):
display='Clear local machine ID configuration file')
def _clear_local_machine_id_configuration_file(self):
"""Clear the /etc/machine-id file if present. This file is used by
systemd to uniquelly identify systems and will be automatically
systemd to uniquely identify systems and will be automatically
populated on the next boot if empty."""
if self.image.g.is_file('/etc/machine-id'):
self.image.g.truncate('/etc/machine-id')
if self.image.g.is_file('/var/lib/dbus/machine-id'):
self.image.g.truncate('/var/lib/dbus/machine-id')
def _persistent_grub1(self, new_root):
"""Replaces non-persistent device name occurrences with persistent
ones in GRUB1 configuration files.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment