jedi4ever / mccloud

Vagrant for the cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mccloud fails on a Windows Client

tknerr opened this issue · comments

using current HEAD revision of libvirt branch (d2370fa) on a Windows7 / Ruby 1.9.3p125 install:

mccloud init works as expected and creates a Mccloudfile

a subsequent call to mccloud status fails silently with the following error:

W:\tmp\testo>mccloud status
Error processing configfile - Sorry

with logging turned on (set MCCLOUD_LOG=STDOUT) I get this:

W:\tmp\testo>mccloud status
2012-08-21 10:06:59 +0200 - environment - [mccloud] Setting @cwd to .
2012-08-21 10:06:59 +0200 - environment - [mccloud] Setting @mccloud_file to Mccloudfile
2012-08-21 10:06:59 +0200 - environment - [mccloud] Setting @autoload to true
2012-08-21 10:06:59 +0200 -  - [mccloud] Calculating computed rootpath
2012-08-21 10:06:59 +0200 -  - [mccloud] Start provided: .
2012-08-21 10:06:59 +0200 - environment - [mccloud] Autoload activated? true
2012-08-21 10:06:59 +0200 - environment - [mccloud] Environment initialized (#<Mccloud::Environment:0x2813790>)
2012-08-21 10:06:59 +0200 - environment - [mccloud]  - cwd : .
2012-08-21 10:06:59 +0200 - config - [mccloud] Initializing empty list of vms,lbs,stacks, ips in config
2012-08-21 10:06:59 +0200 - environment - [mccloud] Loading configuration...
2012-08-21 10:06:59 +0200 -  - [mccloud] Reading Mccloud::Config.run do |config|

<.....rest of config file displayed.....>

end # End Mccloud

2012-08-21 10:06:59 +0200 -  - [mccloud] done loading the mccloud setting
2012-08-21 10:06:59 +0200 -  - [mccloud] initalizing keypair
2012-08-21 10:06:59 +0200 - config provider - [mccloud] Start stubbing provider
2012-08-21 10:06:59 +0200 - config provider - [mccloud] End stubbing provider
2012-08-21 10:06:59 +0200 - config provider - [mccloud] Found provider of type aws
2012-08-21 10:07:00 +0200 - ui - [mccloud] Error processing configfile - Sorry
Error processing configfile - Sorry

The actual error message was swallowed around here:
https://github.com/jedi4ever/mccloud/blob/libvirt/lib/mccloud/config.rb#L88-91

not sure whether this should be something like...

      rescue LoadError => e
        raise ::Mccloud::Error, "Error processing configfile: #{e}"

...or rather

      rescue LoadError => e
        env.ui.error "Error loading configfile - Sorry"
        env.ui.error e.message
        exit -1

However, it seems to be a windows-client specific issue because pty is not available on a Windows Ruby:

W:\tmp\testo>mccloud status
Error processing configfile: cannot load such file -- pty

Working on a fix for that...

Ok, now that I removed the pty dependency I got a step farther, but the provisioning fails.

I'm assuming a cygwin-compiled rsync.exe and ssh.exe on the PATH, but the rsync command fails, most likely due to the permission problems described here:
http://stackoverflow.com/questions/5798807/rsync-permission-denied-created-directories-have-no-permissions

I might be copying a few methods from here which helped resolve the same issue for knife-solo:
matschaffer/knife-solo#91

works now, thanks!