-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Couldn't you do this with canary files and custom facts?
VM Creation:
Start VM
Check VM
Drop .VM_active
Fact $VM_active (where VM is the VM name)
Manifest:
if ! $VM_active {
exec { 'create_vm': ... }
}
Then, you just go whack $VM_active with MCollective, or SSH with ralsh or
whatever to make it start again on the next run.
Trevor
On 11/21/2011 08:11 PM, [email protected] wrote:
>
> Issue #3760 has been updated by Nigel Kersten.
>
> Status changed from Needs Decision to Needs More Information
>
> There are a couple of things here that concern me, primarily around nodes now
> being able to request classes that they're not able to.
>
> I'd love to see feedback on clear ways we could resolve that... as that feels
> like the major blocker to implementing this.
>
> Note that potential workarounds here are:
>
> * Define environments that contain these one-off classes and use the
> `environment` argument.
> * Define nodes that contains only these one-off classes, and use the
> `node_name_value` argument.
>
>
> ----------------------------------------
> Feature #3760: Support one-off or single run manifests
> https://projects.puppetlabs.com/issues/3760
>
> Author: R.I. Pienaar
> Status: Needs More Information
> Priority: Normal
> Assignee: Nigel Kersten
> Category:
> Target version:
> Affected Puppet version: 0.25.4
> Keywords:
> Branch:
>
>
> Lots of actions that you'd want to perform are potentially destructive:
>
> * start your OS installer after creating a virtual machine
> * create a bunch of empty tables, dropping whatever is there now in a DB
> * create/re-create LVM partitions
>
> and so forth. The usual approach is to use an exec that then create some
> file and use the creates => option, this is risky as those little locks may
> end up in lost+found resulting in huge data loss.
>
> IF would be handy if I can have classes that associate with other classes,
> example:
>
> <pre>
> class xen::vm::mybox {
> # create the VM config files here
> }
>
> class xen::vm::mybox::build {
> include xen
> require xen::vm::mybox
>
> # initiate the building process here which might also do rebuilds, it
> would require
> #Â some resources from xen::vm::mybox in it's execs
> }
>
> node dom0 {
> $location = "dc1"
>
> include xen, xen::vm::mybox
> }
>
> </pre>
>
> I'd want to be able to run the node that only has the xen VM definition in it
> but at some other point when I am ready I want a way to run the node but only
> the _xen::vm::mybox::build_ class. This special one-off run should have
> access to facts, variables provided by my node block - the _$location_ var in
> this case.
>
> In other words it should run through the whole compile process as normal, but
> instead of the classes that's in the node block it should run my provided
> class.
>
> When I am ready to build/rebuild my VM I can just do:
>
> <pre>
> puppetd --test --runonce xen::vm::mybox::build
> </pre>
>
> I'd do this as often as I need to rebuild my VM.
>
> This is one use case, we'd need some way to do this in a generic way. Today
> we have the --class option that's close but it has the caveat that the class
> has to be included on the node which we'd not want as these are special
> one-off or infrequent use classes. The main reason for this is to keep all
> the logic related to VMs in one place, in one language and in one
> documentation tree using puppetdoc.
>
> I am writing this in response to discussions in #2658.
>
>
>
- --
Trevor Vaughan
Vice President, Onyx Point, Inc.
email: [email protected]
phone: 410-541-ONYX (6699)
pgp: 0x6C701E94
- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAEBAgAGBQJOyweBAAoJECNCGV1OLcyp8YEH/iqkTwtdNzg6+gJd6cDIEPWO
H4t6lDehzxGIeimdVKsVoKBk94ktNRmsSsnv8seyENdYT/AAGdbsQflm9JW4Hgh0
1eZY3ZtdwTzEwBgt7r3YEkznKoKS7ImVX0oNnKI05RBHr5uwTXWzd5yIIFHlP7mN
NJjFkOxyDog2u5svsnI07oi0couNt5fGYJrv/9weh+GPzDagzOMFtHIcaV1Ol4Wg
f44/z35nBQbjq4RRpOnqzWnUwC6qFMwEkDb7HqvbmexWXMyPtovbzcwuyNRdaGmF
fWCxItmZ6MT6oAnJ81O2wZvdDf2Wrdfom2LqC6fpnF0HX5Ri3cXcaEzcNVhn3g4=
=sago
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.
<<attachment: tvaughan.vcf>>
