Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying on a different hard disk requires to specify the partition number #3

Open
petitalb opened this issue Jan 23, 2017 · 0 comments

Comments

@petitalb
Copy link

Hi,

Kadeploy lets the possibility to modify the hard disk on which it will deploys the environment (option "-b"). For instance, to deploy on /dev/sda instead of /dev/sdb (the default one, on my clusters), I execute kadeploy3 -m erods-ds-1 -e jessie-x64-nfs -b sda -k.

Such a command returns the following error:

Deployment #D-837a5766-6fe4-4faa-9c30-d0e947ed663c started
[Internal Server Error]
---- NameError ----
uninitialized constant Kadeploy::APIError::INVALID
---- Stack trace ----
/usr/lib/ruby/vendor_ruby/kadeploy3/server/workflow.rb:508:in `check_config'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/workflow.rb:144:in `load_config'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/automata.rb:165:in `initialize'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/workflow.rb:16:in `initialize'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/kaworkflow.rb:376:in `new'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/kaworkflow.rb:376:in `block (3 levels) in work_create'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/kaworkflow.rb:345:in `each_pair'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/kaworkflow.rb:345:in `block (2 levels) in work_create'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/kaworkflow.rb:335:in `synchronize'
/usr/lib/ruby/vendor_ruby/kadeploy3/server/kaworkflow.rb:335:in `block in work_create'
---------------------

First it seems that the error is not correctly managed by Kadeploy. Besides, if we look closer on the source code (/usr/lib/ruby/vendor_ruby/kadeploy3/server/workflow.rb):

# Deploy on block device
if cexec.block_device and !cexec.block_device.empty? \
	and (!cexec.deploy_part or cexec.deploy_part.empty?)

	# Without a dd image
	unless cexec.environment.image[:kind] == ‘dd'
		error(APIError::INVALID,"You can only deploy directly on block device when using a dd image”)
	end

[…]

end

We can see that the if condition requires the use of the option "-p" together with the option "-b". Such a constraint is mentioned neither on the documentation, nor on the man page, nor on the error returned by Kadeploy. Besides, I do not understand such a constraint as I may want to modify the hard disk without modifying the partitioning.

Best regards,
Albin PETIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant