61 Commits

Author SHA1 Message Date
Julio Montes 703b7cdcd2 update version from 4 to 5 v5 2015-11-27 14:36:22 -06:00
Julio Montes 457a41b261 update cloud-config documentation
update hostname and runcmd doc
2015-11-27 12:49:31 -06:00
Julio Montes 85dcda040f implement runcmd ccmodule
this module is able to execute command lines
2015-11-27 12:46:42 -06:00
Julio Montes d4963adb31 remove new line in output and error logs 2015-11-27 12:41:42 -06:00
Julio Montes e92fd7cb02 update .gitignore
ignore files generated by unit tests
2015-11-27 10:43:07 -06:00
Julio Montes 6b8758147c add unit test for chown_path 2015-11-27 10:40:08 -06:00
Julio Montes 7e64fbd558 add unit tests for lib
add exec_test unit test
add option --disable-tests do not build unit tests
2015-11-26 12:26:56 -06:00
Julio Montes 97b7691f3b add exec_task standard output to logging system 2015-11-26 12:01:21 -06:00
devimc c4fbe3232f Merge pull request #6 from ikeydoherty/fixes_rebase
Fixes rebase
2015-11-25 10:47:17 -06:00
Ikey Doherty 24b84ba453 Make write_ssh_key bool for clarity, ensure return value
In future we should convert openstack_metadata_keys to a boolean function,
and make sure it breaks iteration of the GNode when hitting a failure,
similar to other areas within clr-cloud-init

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:29:59 +00:00
Ikey Doherty 3f93a3b249 Make write_sudo_string bool for clarity, ensure return value is used
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:29:27 +00:00
Ikey Doherty 356fc5c1df lib: Ensure return values aren't ignored for errno types
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:28:44 +00:00
Ikey Doherty 5579bb59f5 debug: Also catch unused parameter
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:28:15 +00:00
Ikey Doherty 3f012a00db Update .gitignore to ignore *.plist from scan-build
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:28:00 +00:00
Ikey Doherty 939a0ffe76 write_files: Address potential memory leak found in static analysis
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:27:46 +00:00
Ikey Doherty d60802812b Strengthen flags to fix unused variables and unsigned vs signed comparison
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:27:18 +00:00
Ikey Doherty a0952e55f2 Fix prototype for exec_task
This was introduced in d259dacf5b

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:24:00 +00:00
Ikey Doherty 842cda7924 Update README with complete dependency list
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:21:53 +00:00
Ikey Doherty c8c6482c42 disk: Ensure we use the explicit path to resize2fs
On some configurations, /sbin and /usr/sbin may not even be in the $PATH,
meaning that the configure routine would fail if this is where resize2fs
lives. Secondly, we must ensure that disks now uses this explicit path.

This ensures correct functionality during non privileged testing, and
consistency with installed behaviour.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:21:49 +00:00
Ikey Doherty 880e0bc84e Drop libparted requirement to 3.1, 3.2 isn't explicitly needed
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:21:44 +00:00
Julio Montes 8a655b0b5c update version from 3 to 4 v4 2015-11-24 13:56:08 -06:00
Julio Montes d259dacf5b reimplement exec_task function 2015-11-24 13:52:50 -06:00
Julio Montes bbd77c21a8 enable cloud-init-firstboot service
Signed-off-by: Julio Montes <julio.montes@intel.com>
2015-11-24 10:14:32 -06:00
Julio Montes 0be3c8ebf5 implement hostname module
this module is able to set the system's hostname

add hostname module documentation
update userdata test file
2015-11-20 16:59:08 -06:00
devimc 0c835d688c Merge pull request #3 from cgwalters/autogen-buildapi
autogen: Honor NOCONFIGURE environment variable
2015-11-20 15:48:53 -06:00
Julio Montes a67cbc9a85 update version from v2 to v3 v3 2015-11-20 15:42:58 -06:00
Colin Walters 9b71c00e26 autogen: Honor NOCONFIGURE environment variable
See https://github.com/cgwalters/build-api/ for rationale.
2015-11-20 16:01:36 -05:00
Julio Montes 89cbfb4313 add cloud-init-firstboot service
cloud-init-firstboot service will do initial tasks
  * create and set up default user
  * get and process metadata/userdata from datasources
  * disable root login
this service will run once (firstboot)

cloud-init service won't run at the first boot
but it will do at next boot times
	* verify/fix/resize/grow up partitions and filesystems
	* get and process userdata from datasources (TODO: optional)
2015-11-20 11:06:40 -06:00
Julio Montes 71d7ebe86b update docs
add no-growpart doc
2015-11-20 10:53:11 -06:00
Julio Montes 31b04b7a89 update version from v1 to v2 v2 2015-11-19 16:10:44 -06:00
Julio Montes 29b0f75036 fix partition/filesystem resizing and growing
remove get_partition function because now we have
other functions to manipulate disks
2015-11-19 15:56:06 -06:00
Julio Montes 9a34076e96 add functions to manipulate disks
add blkid library

functions:
* disk_for_path: is a useful function to get
  the disk path where a specific is mounted
  for instance: / -> /dev/sda
* disk_resize_grow: resizes/grows partitions and filesystems
  this function uses the last disk partition/filesystem
  for resize it
2015-11-19 15:41:15 -06:00
Julio Montes 616fb9d6f7 update manpage
add openstack-metadata-file option to manpage
2015-11-18 13:57:18 -06:00
Julio Montes 8f463d81d0 style fixes 2015-11-18 12:19:04 -06:00
Julio Montes 096cff3959 fix typos
change help menu message

Signed-off-by: Julio Montes <julio.montes@intel.com>
2015-11-18 12:10:18 -06:00
Auke Kok b554149019 Update cli command to add a bundle. 2015-11-17 21:56:38 +00:00
Auke Kok 98e02ec548 New command line tool format. 2015-11-17 21:55:36 +00:00
Auke Kok baaf9c6546 write_files: assure path to file exists with mkdir -p.
We call `mkdir -p` for easy code here, but we still have to
split the path into dirname first and check if we actually
have to create it or not, and try and catch any errors in that
path.
2015-11-17 21:17:41 +00:00
Auke Kok 4befc0f2cf Falling through this loop means an error, so return NULL. 2015-11-16 23:07:36 +00:00
Auke Kok f2185adb69 Accidentally listed stdlib.h twice here. 2015-11-16 22:43:14 +00:00
Auke Kok 4dc25a468a Catch mkstemp error, just in case. 2015-11-16 22:42:43 +00:00
Auke Kok 12c28f324a Remove an unneeded goto.
This goto was leaking a file descriptor, and it uses more
lines of code than it saves.
2015-11-16 22:31:42 +00:00
Julio Montes ab5f9b360d add support to verify disk partitions
add libparted dependency
update help menu
resize filesystem
2015-11-13 13:10:41 -06:00
Julio Montes e9684aed39 add function to find the partition of a mount point 2015-11-13 10:53:23 -06:00
Julio Montes b57882ba89 fix exit values
add enums for long options
update help menu
2015-11-12 21:02:07 -06:00
Julio Montes 4b19805315 update version from v0 to v1 v1 2015-11-11 13:20:46 -06:00
Auke Kok ec4841a0f1 Add section describing user-data formats supported.
user-data can be either in the cloud-config format, or
a shell script. This paragraph adds this difference and
how it's treated.
2015-11-09 22:25:19 +00:00
Auke Kok 7cefb90110 Add a hint for debug output when reporting bugs. 2015-11-09 22:12:59 +00:00
Julio Montes e304dde92d write 'hostname' to /etc/hostname file
fix format help menu
2015-11-09 13:12:46 -06:00
Auke Kok 90b6d2895d Fix make distcheck.
Adding new openstack data source header file.
2015-11-09 18:16:56 +00:00