snf-image
12 years agoMinor fixes in helper's tasks
Nikos Skalkotos [Fri, 11 Nov 2011 11:04:09 +0000 (13:04 +0200)]
Minor fixes in helper's tasks

12 years agoFix custom images support
Nikos Skalkotos [Fri, 11 Nov 2011 09:06:13 +0000 (11:06 +0200)]
Fix custom images support

* Add code to compute the remote filesize
* Check for wget and curl in the configuration phase

12 years agoFix various bugs in snf-image-helper
Nikos Skalkotos [Thu, 10 Nov 2011 16:58:54 +0000 (18:58 +0200)]
Fix various bugs in snf-image-helper

* In decode-properties.py, use subprocess.Popen method instead of
  subprocess.check_output, which is introduced in python 2.7

* Fix a bug in snf-image-helper where decode-properties.py was not
  properly called

* Fix a bug in FixPartitionTable task

12 years agoFix bash syntax error in a case statement
Nikos Skalkotos [Thu, 10 Nov 2011 14:58:01 +0000 (16:58 +0200)]
Fix bash syntax error in a case statement

12 years agoAdd initial support for custom images
Nikos Skalkotos [Wed, 9 Nov 2011 15:07:31 +0000 (17:07 +0200)]
Add initial support for custom images

12 years agoSupport USERS property in ChangePassword task
Nikos Skalkotos [Wed, 9 Nov 2011 14:57:40 +0000 (16:57 +0200)]
Support USERS property in ChangePassword task

12 years agoAdd image-properties support in helper
Nikos Skalkotos [Wed, 9 Nov 2011 13:50:04 +0000 (15:50 +0200)]
Add image-properties support in helper

12 years agoUse load method instead of loads in inject-files
Nikos Skalkotos [Wed, 9 Nov 2011 09:53:10 +0000 (11:53 +0200)]
Use load method instead of loads in inject-files

12 years agoCreate a bash wrapper for EnforcePersonality.py
Nikos Skalkotos [Tue, 8 Nov 2011 13:17:01 +0000 (15:17 +0200)]
Create a bash wrapper for EnforcePersonality.py

All tasks should be bash scripts that source common.sh. We have also
fixed BUG #1577

12 years agoAdd code to make task exclusion possible
Nikos Skalkotos [Mon, 7 Nov 2011 16:03:57 +0000 (18:03 +0200)]
Add code to make task exclusion possible

12 years agoRemove forgotten -l option in update-helper
Nikos Skalkotos [Mon, 7 Nov 2011 09:49:46 +0000 (11:49 +0200)]
Remove forgotten -l option in update-helper

12 years agoAdd parted as a default pkgs in HELPER_EXTRA_PKGS
Nikos Skalkotos [Mon, 7 Nov 2011 09:13:18 +0000 (11:13 +0200)]
Add parted as a default pkgs in HELPER_EXTRA_PKGS

12 years agoAdd `img_properties` OS parameter
Constantinos Venetsanopoulos [Tue, 8 Nov 2011 09:23:35 +0000 (11:23 +0200)]
Add `img_properties` OS parameter

The img_properties parameter is a json dictionary
(json.dumps format) which contains all the necessary
properties that will be used to customize the new image.

12 years agoAdd renamed and new tasks in helper's Makefile.am
Nikos Skalkotos [Sun, 6 Nov 2011 23:21:57 +0000 (01:21 +0200)]
Add renamed and new tasks in helper's Makefile.am

12 years agoAdd parted as a dependency for helper in configure
Nikos Skalkotos [Sun, 6 Nov 2011 22:31:28 +0000 (00:31 +0200)]
Add parted as a dependency for helper in configure

12 years agoAdd diskdump support in the helper (part 2)
Nikos Skalkotos [Fri, 4 Nov 2011 15:39:37 +0000 (17:39 +0200)]
Add diskdump support in the helper (part 2)

12 years agoAdd diskdump support in the helper (part 1)
Nikos Skalkotos [Thu, 3 Nov 2011 16:23:59 +0000 (18:23 +0200)]
Add diskdump support in the helper (part 1)

12 years agoPass a new (SNF_IMAGE_)ROOT variable to the helper
Nikos Skalkotos [Thu, 3 Nov 2011 15:15:15 +0000 (17:15 +0200)]
Pass a new (SNF_IMAGE_)ROOT variable to the helper

For {ext,ntfs}dump this is always 1.
For diskdump this is an image property

12 years agoAdd diskdump support in create (part 2)
Nikos Skalkotos [Wed, 2 Nov 2011 14:42:38 +0000 (16:42 +0200)]
Add diskdump support in create (part 2)

12 years agoAdd diskdump support in create
Nikos Skalkotos [Mon, 31 Oct 2011 15:05:05 +0000 (17:05 +0200)]
Add diskdump support in create

12 years agoBeautify common.sh.in
Nikos Skalkotos [Mon, 31 Oct 2011 15:02:43 +0000 (17:02 +0200)]
Beautify common.sh.in

12 years agoBeautify help msg in update-helper
Nikos Skalkotos [Wed, 26 Oct 2011 14:12:04 +0000 (17:12 +0300)]
Beautify help msg in update-helper

Also remove `-l' option. It's no longer needed.

12 years agoAdd input options in update-helper script
Nikos Skalkotos [Wed, 26 Oct 2011 09:12:57 +0000 (12:12 +0300)]
Add input options in update-helper script

12 years agoUpdate ChangeLogs for v0.1.2 v0.1.2
Nikos Skalkotos [Thu, 20 Oct 2011 09:08:45 +0000 (12:08 +0300)]
Update ChangeLogs for v0.1.2

12 years agoFix issues #1531 #1532 #1533
Nikos Skalkotos [Thu, 20 Oct 2011 08:31:18 +0000 (11:31 +0300)]
Fix issues #1531 #1532 #1533

12 years agoUpdate ChangeLog Files v0.1.1
Nikos Skalkotos [Mon, 17 Oct 2011 10:09:28 +0000 (13:09 +0300)]
Update ChangeLog Files

12 years agoAdd timestamp before & after helper VM's execution
Nikos Skalkotos [Mon, 17 Oct 2011 10:04:37 +0000 (13:04 +0300)]
Add timestamp before & after helper VM's execution

12 years agoReplace $(var) with ${var} in defaults file.
Nikos Skalkotos [Mon, 17 Oct 2011 08:52:27 +0000 (11:52 +0300)]
Replace $(var) with ${var} in defaults file.

12 years agoAdd timestamps in output of run-parts hooks
Vangelis Koukis [Mon, 17 Oct 2011 08:36:10 +0000 (11:36 +0300)]
Add timestamps in output of run-parts hooks

Prepend a timestamp before every line of output of run-parts hooks,
needed as a quick-n-dirty way to estimate the time taken by each hook to
complete.

Refs #1499

12 years agoFix a typo in a var name in ChangePassword task
Nikos Skalkotos [Fri, 14 Oct 2011 08:38:07 +0000 (11:38 +0300)]
Fix a typo in a var name in ChangePassword task

This has an affect on fedora and ubuntu instances, where user password
is not changed. Only the root one.

12 years agoFix a dangerous-use-of-xargs bug in create v0.1
Nikos Skalkotos [Thu, 13 Oct 2011 11:09:35 +0000 (14:09 +0300)]
Fix a dangerous-use-of-xargs bug in create

12 years agoMake helper print warnings for missing sshd_config
Nikos Skalkotos [Thu, 13 Oct 2011 10:37:53 +0000 (13:37 +0300)]
Make helper print warnings for missing sshd_config

DeleteSShKeys task used to fail when /etc/ssh/sshd_config was missing.
We decided to relax this constraint and make it create warnings instead.

12 years agoFix usage of file as a var in personality task
Vangelis Koukis [Thu, 13 Oct 2011 09:05:53 +0000 (12:05 +0300)]
Fix usage of file as a var in personality task

Fix usage of file as a var name, in personality task,
it's a built-in Python identifier.

12 years agoUpdate the task info comments in the tasks files
Nikos Skalkotos [Thu, 13 Oct 2011 04:36:00 +0000 (07:36 +0300)]
Update the task info comments in the tasks files

12 years agoFix helper's Enforce Personality task
Nikos Skalkotos [Wed, 12 Oct 2011 22:12:07 +0000 (01:12 +0300)]
Fix helper's Enforce Personality task

The python code did not compile. File object was not created correct.

12 years agoFix helper's delete SSH keys task
Nikos Skalkotos [Wed, 12 Oct 2011 19:37:45 +0000 (22:37 +0300)]
Fix helper's delete SSH keys task

12 years agoRemove .py extension from EnforcePersonality task
Nikos Skalkotos [Wed, 12 Oct 2011 09:04:14 +0000 (12:04 +0300)]
Remove .py extension from EnforcePersonality task

run-parts refuses to execute files with extensions.

12 years agoFix a Makefile bug introduced in the last commit
Nikos Skalkotos [Wed, 12 Oct 2011 08:50:37 +0000 (11:50 +0300)]
Fix a Makefile bug introduced in the last commit

12 years agoInclude EnforcePersonality task in Makefile.am
Nikos Skalkotos [Wed, 12 Oct 2011 08:27:40 +0000 (11:27 +0300)]
Include EnforcePersonality task in Makefile.am

12 years agoFix helper's Enforce Personality task
Nikos Skalkotos [Tue, 11 Oct 2011 21:35:32 +0000 (00:35 +0300)]
Fix helper's Enforce Personality task

12 years agoFix minor bugs, update AUTHORS
Vangelis Koukis [Tue, 11 Oct 2011 19:51:20 +0000 (22:51 +0300)]
Fix minor bugs, update AUTHORS

Make sure snf-image-host passes the magic argument
in the kernel command line of the helper VM to activate snf-image-helper,
update AUTHORS.

12 years agoFix a bug in helper's get_distro function
Nikos Skalkotos [Tue, 11 Oct 2011 11:47:28 +0000 (14:47 +0300)]
Fix a bug in helper's get_distro function

12 years agoAvoid activating snf-image-helper by mistake
Vangelis Koukis [Mon, 10 Oct 2011 15:16:05 +0000 (18:16 +0300)]
Avoid activating snf-image-helper by mistake

Only activate the snf-image-helper automatically if the caller
has passed a magic argument in the kernel command line.

Require a '--force' argument to activate snf-image-helper,
to avoid accidental execution of the script.

12 years agoAdd top-level README, point to the snf-image Wiki
Vangelis Koukis [Mon, 10 Oct 2011 14:40:53 +0000 (17:40 +0300)]
Add top-level README, point to the snf-image Wiki

12 years agoMinor fixes to documentation
Vangelis Koukis [Mon, 10 Oct 2011 14:04:14 +0000 (17:04 +0300)]
Minor fixes to documentation

12 years agoFix typos, remove reference to $windows_support
Vangelis Koukis [Mon, 10 Oct 2011 12:42:32 +0000 (15:42 +0300)]
Fix typos, remove reference to $windows_support

12 years agoReplace losetup in update-helper with the $LOSETUP
Nikos Skalkotos [Mon, 10 Oct 2011 10:41:36 +0000 (13:41 +0300)]
Replace losetup in update-helper with the $LOSETUP

This is really minor, but since we are using a bash var for losetup in
create, which is overwritable from the defaults file, lets keep it that
way.

12 years agoFix some minor things in defaults file
Nikos Skalkotos [Mon, 10 Oct 2011 07:57:25 +0000 (10:57 +0300)]
Fix some minor things in defaults file

12 years agoFix a var name bug introduced in the last commit
Nikos Skalkotos [Mon, 10 Oct 2011 07:50:19 +0000 (10:50 +0300)]
Fix a var name bug introduced in the last commit

12 years agoMass cleanup and some bug fixing
Nikos Skalkotos [Mon, 10 Oct 2011 06:43:27 +0000 (09:43 +0300)]
Mass cleanup and some bug fixing

 * Make all "local" variables lowercase.
 * Move HELPER_EXTRA_PKGS from snf-image-update-helper to common.sh
 * Protect all variables from spaces and other special chars
 * Remove extra X's from mktemp template names (only 6 are supported).
 * Make sure pipelines fail if any command (not only the rightmost)
   fails

12 years agoFix minor typos in update-helper script
Nikos Skalkotos [Fri, 7 Oct 2011 12:23:35 +0000 (15:23 +0300)]
Fix minor typos in update-helper script

12 years agoCorrect the IMAGE_DIR var in the defaults file
Nikos Skalkotos [Fri, 7 Oct 2011 10:12:23 +0000 (13:12 +0300)]
Correct the IMAGE_DIR var in the defaults file

12 years agoBeautify the output of update-helper script
Nikos Skalkotos [Fri, 7 Oct 2011 09:51:33 +0000 (12:51 +0300)]
Beautify the output of update-helper script

12 years agoDisable the umount trap if run-parts returns 0
Nikos Skalkotos [Fri, 7 Oct 2011 08:46:21 +0000 (11:46 +0300)]
Disable the umount trap if run-parts returns 0

12 years agoMake helper try to umount $target on errors
Nikos Skalkotos [Fri, 7 Oct 2011 08:40:09 +0000 (11:40 +0300)]
Make helper try to umount $target on errors

Since the mount and umount commands are tasks, if a task fails, the
filesystem may have been left mounted. For this case, I've created a
trap that tries to umount the filesystem

12 years agoRemove filesystem scan enforcement rules in helper
Nikos Skalkotos [Thu, 6 Oct 2011 15:07:31 +0000 (18:07 +0300)]
Remove filesystem scan enforcement rules in helper

Helper image should never have filesystem checks. The default rule mkfs
implies is to check every 24 mounts or 180 days.

12 years agoReduce helper's timeout limits
Nikos Skalkotos [Thu, 6 Oct 2011 14:52:35 +0000 (17:52 +0300)]
Reduce helper's timeout limits

12 years agoMake helper boot from a temporary image snapshot
Nikos Skalkotos [Thu, 6 Oct 2011 14:49:39 +0000 (17:49 +0300)]
Make helper boot from a temporary image snapshot

12 years agoAdd unattend.xml file in snf-image-helper
Nikos Skalkotos [Thu, 6 Oct 2011 12:56:37 +0000 (15:56 +0300)]
Add unattend.xml file in snf-image-helper

12 years agoFix a bug in helper's common.sh
Nikos Skalkotos [Thu, 6 Oct 2011 12:16:52 +0000 (15:16 +0300)]
Fix a bug in helper's common.sh

It's the same thing fixed in 9aac6898988ab63e7e323d745c41dfb927c51b2f
in the host's code

12 years agoFix a path in 50ChangePassword script
Nikos Skalkotos [Thu, 6 Oct 2011 11:35:28 +0000 (14:35 +0300)]
Fix a path in 50ChangePassword script

50ChangePassword was looking in commondir instead of scriptsdir for
snf-passtohash.py

12 years agoFix tasks directory existence check
Nikos Skalkotos [Thu, 6 Oct 2011 10:10:55 +0000 (13:10 +0300)]
Fix tasks directory existence check

12 years agoMake update-helper update the images /etc/rc.local
Nikos Skalkotos [Thu, 6 Oct 2011 09:26:32 +0000 (12:26 +0300)]
Make update-helper update the images /etc/rc.local

This is needed in order to make the helpers code autorun

12 years agoAdd further functionality in update-helper script
Nikos Skalkotos [Thu, 6 Oct 2011 08:19:31 +0000 (11:19 +0300)]
Add further functionality in update-helper script

 * Make the script install the snf-image-helper package inside the
   created image.
 * Add more diagnostic messages

12 years agoFix a bug in common.sh
Nikos Skalkotos [Thu, 6 Oct 2011 08:10:05 +0000 (11:10 +0300)]
Fix a bug in common.sh

test returned !0 causing problems to the script!

12 years agoAdd install-mbr in configure's required packages
Nikos Skalkotos [Wed, 5 Oct 2011 14:20:58 +0000 (17:20 +0300)]
Add install-mbr in configure's required packages

12 years agoMove update-helper script to snf-image-host
Nikos Skalkotos [Wed, 5 Oct 2011 13:48:12 +0000 (16:48 +0300)]
Move update-helper script to snf-image-host

12 years agoAdd script to construct a new helper VM image
Nikos Skalkotos [Wed, 5 Oct 2011 13:40:56 +0000 (16:40 +0300)]
Add script to construct a new helper VM image

The scripts runs debootstrap and creates a new disk image

12 years agoRename host to snf-image-host
Constantinos Venetsanopoulos [Wed, 5 Oct 2011 10:49:40 +0000 (13:49 +0300)]
Rename host to snf-image-host

Also add ChangeLog and COPYING info

12 years agoRename helper to snf-image-helper
Constantinos Venetsanopoulos [Wed, 5 Oct 2011 09:17:51 +0000 (12:17 +0300)]
Rename helper to snf-image-helper

Also add Changelog and COPYING info

12 years agoFix paths in Makefile.am
Nikos Skalkotos [Tue, 4 Oct 2011 13:26:52 +0000 (16:26 +0300)]
Fix paths in Makefile.am

12 years agoFix helper's Makefile
Nikos Skalkotos [Tue, 4 Oct 2011 12:48:21 +0000 (15:48 +0300)]
Fix helper's Makefile

 * Change the main script from rc.local to snf-image-helper.
 * Fix some build dirs.

12 years agoRemove "Clean UP executed" echo line.
Nikos Skalkotos [Tue, 4 Oct 2011 09:53:20 +0000 (12:53 +0300)]
Remove "Clean UP executed" echo line.

It's just annoing

12 years agoRemove -root field from the images filename format
Nikos Skalkotos [Tue, 4 Oct 2011 09:48:46 +0000 (12:48 +0300)]
Remove -root field from the images filename format

It is completely redundant. We don't support -boot of any other format.

12 years agoFix bugs in create
Nikos Skalkotos [Tue, 4 Oct 2011 09:38:46 +0000 (12:38 +0300)]
Fix bugs in create

 * Fix kvm guest execution command
 * Remove \r\n from the result file before reading it

12 years agoRun helper vm as a non-root user
Nikos Skalkotos [Mon, 3 Oct 2011 16:26:18 +0000 (19:26 +0300)]
Run helper vm as a non-root user

12 years agoAdd limits on helper VM execution time
Nikos Skalkotos [Mon, 3 Oct 2011 16:08:47 +0000 (19:08 +0300)]
Add limits on helper VM execution time

12 years agoFix the OSP_IMG_PERSONALITY existence check
Nikos Skalkotos [Mon, 3 Oct 2011 14:35:14 +0000 (17:35 +0300)]
Fix the OSP_IMG_PERSONALITY existence check

12 years agoParse helpers result file
Nikos Skalkotos [Mon, 3 Oct 2011 14:08:20 +0000 (17:08 +0300)]
Parse helpers result file

12 years agoAdd result file support in helper
Nikos Skalkotos [Mon, 3 Oct 2011 14:00:01 +0000 (17:00 +0300)]
Add result file support in helper

Helper always outputs the result to the second serial port (ttyS1).

12 years agoMinor fix in 50EnforcePersonality.py
Constantinos Venetsanopoulos [Mon, 3 Oct 2011 14:21:58 +0000 (17:21 +0300)]
Minor fix in 50EnforcePersonality.py

12 years agoInitial commit to support the personality feature
Constantinos Venetsanopoulos [Mon, 3 Oct 2011 14:03:08 +0000 (17:03 +0300)]
Initial commit to support the personality feature

 * Support for file injection functionality
 * Add the img_personality OS parameter

12 years agoFix a bug in the helper's floppy creation code
Nikos Skalkotos [Mon, 3 Oct 2011 13:02:49 +0000 (16:02 +0300)]
Fix a bug in the helper's floppy creation code

Thank you cven.

12 years agoBoot helper wth external kernel
Nikos Skalkotos [Mon, 3 Oct 2011 12:50:33 +0000 (15:50 +0300)]
Boot helper wth external kernel

12 years agoMake HELPER var overwritable from defaults
Nikos Skalkotos [Mon, 3 Oct 2011 09:00:06 +0000 (12:00 +0300)]
Make HELPER var overwritable from defaults

  Also did a minor cleanup

12 years agoMake helper get the instance's device file by host
Nikos Skalkotos [Fri, 30 Sep 2011 14:44:20 +0000 (17:44 +0300)]
Make helper get the instance's device file by host

12 years agoFix the installation-path for snf-passtohash.py
Nikos Skalkotos [Fri, 30 Sep 2011 11:05:09 +0000 (14:05 +0300)]
Fix the installation-path for snf-passtohash.py

12 years agoAdd MBR installation command in create
Nikos Skalkotos [Fri, 30 Sep 2011 10:13:46 +0000 (13:13 +0300)]
Add MBR installation command in create

12 years agoAdd commondir variable to helper's building system
Nikos Skalkotos [Fri, 30 Sep 2011 10:12:02 +0000 (13:12 +0300)]
Add commondir variable to helper's building system

12 years agoFix helpers building System
Nikos Skalkotos [Thu, 29 Sep 2011 16:05:41 +0000 (19:05 +0300)]
Fix helpers building System

12 years agoMake sure all tasks contail the vim config line
Nikos Skalkotos [Thu, 29 Sep 2011 13:48:28 +0000 (16:48 +0300)]
Make sure all tasks contail the vim config line

12 years agoFix script errors in helper's tasks
Nikos Skalkotos [Thu, 29 Sep 2011 09:04:24 +0000 (12:04 +0300)]
Fix script errors in helper's tasks

12 years agoExport all SNF_IMAGE_* vars in a static way.
Nikos Skalkotos [Thu, 29 Sep 2011 08:33:57 +0000 (11:33 +0300)]
Export all SNF_IMAGE_* vars in a static way.

12 years agoWrite export before every variable in floppy/rules
Nikos Skalkotos [Thu, 29 Sep 2011 08:29:23 +0000 (11:29 +0300)]
Write export before every variable in floppy/rules

This way we make sure that the helper's script that sources the rules
file will export those variables

12 years agoAdd PATH to common.sh
Nikos Skalkotos [Thu, 29 Sep 2011 08:27:27 +0000 (11:27 +0300)]
Add PATH to common.sh

Since the helpers scripts run before the login shell, we need to define
the PATH variable ourselfs.

12 years agoFix error messages in helper's tasks
Nikos Skalkotos [Thu, 29 Sep 2011 08:24:58 +0000 (11:24 +0300)]
Fix error messages in helper's tasks

12 years agoRemove the .sh extention in helper's tasks script
Nikos Skalkotos [Wed, 28 Sep 2011 15:30:15 +0000 (18:30 +0300)]
Remove the .sh extention in helper's tasks script

This is causing problems to run-parts

12 years agoChange tasks interpreter from /bin/sh to /bin/bash
Nikos Skalkotos [Wed, 28 Sep 2011 15:00:17 +0000 (18:00 +0300)]
Change tasks interpreter from /bin/sh to /bin/bash

12 years agoFix a typo bug in helper's rc.local
Nikos Skalkotos [Wed, 28 Sep 2011 14:59:40 +0000 (17:59 +0300)]
Fix a typo bug in helper's rc.local

12 years agoMake helper's rc.local executable
Nikos Skalkotos [Wed, 28 Sep 2011 14:21:52 +0000 (17:21 +0300)]
Make helper's rc.local executable