Commit eee82c44 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Merge branch 'hotfix-0.5.1' into debian-wheezy

parents 15bc03a8 cce32fea
2013-08-23, v0.5.1
* Allow more characters in the cloud name
* Fix various bugs
* Handle kamaki config errors
2013-08-04, v0.5
* Add support for sysprep-parameters
* Add support for syspreping Windows media
......@@ -5,7 +10,7 @@
2013-07-31, v0.4.4
* Fix a bug where the system tried to use file scrubbing without
checking if it was supported
checking if it was supported
2013-07-18, v0.4.3
* Force TERM=linux when working on xterm. This makes dialog behave
......
......@@ -50,9 +50,9 @@ copyright = u'2012, 2013 GRNET S.A. All rights reserved'
# built documents.
#
# The short X.Y version.
version = '0.5'
version = '0.5.1'
# The full version, including alpha/beta/rc tags.
release = '0.5'
release = '0.5.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -180,10 +180,10 @@ def extract_image(session):
def _check_cloud(session, name, description, url, token):
"""Checks if the provided info for a cloud are valid"""
d = session['dialog']
regexp = re.compile('^[a-zA-Z0-9_]+$')
regexp = re.compile('^[~@#$:\-\w]+$')
if not re.match(regexp, name):
d.msgbox("Allowed characters for name: [a-zA-Z0-9_]", width=WIDTH)
d.msgbox("Allowed characters for name: a-zA-Z0-9_~@#$:-", width=WIDTH)
return False
if len(url) == 0:
......
......@@ -414,7 +414,8 @@ def create_image(session):
out.clear()
#Sysprep
image.os.sysprep_params.update(wizard['SysprepParams'])
if 'SysprepParams' in wizard:
image.os.sysprep_params.update(wizard['SysprepParams'])
image.os.do_sysprep()
metadata = image.os.meta
......
......@@ -293,7 +293,12 @@ class Image(object):
return self.size
part_dev = "%s%d" % (self.guestfs_device, last_part['part_num'])
self.g.e2fsck_f(part_dev)
if self.check_guestfs_version(1, 15, 17) >= 0:
self.g.e2fsck(part_dev, forceall=1)
else:
self.g.e2fsck_f(part_dev)
self.g.resize2fs_M(part_dev)
out = self.g.tune2fs_l(part_dev)
......
......@@ -38,6 +38,8 @@ The library is used to upload images to and register them with a Synnefo
deployment.
"""
import sys
from os.path import basename
from kamaki.cli.config import Config
......@@ -46,8 +48,11 @@ from kamaki.clients.image import ImageClient
from kamaki.clients.pithos import PithosClient
from kamaki.clients.astakos import AstakosClient
config = Config()
try:
config = Config()
except Exception as e:
sys.stderr.write("Kamaki config error: %s\n" % str(e))
sys.exit(1)
class Kamaki(object):
......
......@@ -320,6 +320,10 @@ class OSBase(object):
* exclude: Exclude all files that follow this pattern.
"""
if not self.image.g.is_dir(directory):
self.out.warn("Directory: `%s' does not exist!" % directory)
return
maxdepth = None if 'maxdepth' not in kargs else kargs['maxdepth']
if maxdepth == 0:
return
......
......@@ -108,9 +108,7 @@ class Unix(OSBase):
def cleanup_mail(self):
"""Remove all files under /var/mail and /var/spool/mail"""
if self.image.g.is_dir('/var/spool/mail'):
self._foreach_file('/var/spool/mail', self.image.g.rm_rf,
maxdepth=1)
self._foreach_file('/var/spool/mail', self.image.g.rm_rf, maxdepth=1)
self._foreach_file('/var/mail', self.image.g.rm_rf, maxdepth=1)
......
__version__ = "0.5"
__version_info__ = ['0', '5']
__version__ = "0.5.1"
__version_info__ = ['0', '5', '1']
__version_vcs_info__ = {
'branch': 'master',
'revid': '5079560',
'revno': 387}
'branch': 'hotfix-0.5.1',
'revid': 'b25b422',
'revno': 393}
__version_user_info__ = "skalkoto@darkstar.admin.grnet.gr"
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