On 04/29/2011 10:53 AM, jcbollinger wrote:
>
> On the conceptual level, what does it or *should* it mean that a node
> has Class['proxy']?  To you it seems to mean that the node positively
> uses an HTTP proxy, at least for Apt.  But it could instead mean that
> the node's proxy configuration is managed, which might include
> ensuring that it doesn't use a proxy.
>

This is an excellent starting point.  Let's just focus
on this assertion: "The proxy configuration is managed".

And let us add that, if the proxy config is wrong, packages may
not get installed on a node (for one puppet run anyway).

The most likely downside is that a puppet run will partially fail
because the proxy gets configured somewhere in the middle of the run.
But, on the next run, things work ok, so not a showstopper.

And, let's forget for the moment that there or non-puppet solutions.

And, I will leave out any example implementation, so there is nothing to
pick at there.

But any solution in puppet should, as you point out, either establish
or remove a proxy, depending on something.  Maybe a choice of
apt::proxy or apt::noproxy, or maybe some parameter or variable value.

But by its nature the proxy config is something we would like to have
happen first.

Can this be expressed in puppet as a drop in?  Can I design a module
that manages the proxy, such that when I add that module to an existing
design, I don't have to visit every module and add a require in order
to control the order of things?

It appears that I cannot.

What changes to puppet would make it possible?

        1. all classes are in stage[main] by default.

Then the API for the proposed proxy module could require that
        - stage[proxy] be defined
        - stage[proxy] is put in sequence before any stages
          that allow packages to be installed

and the implementation could have a helper class that does the
actual configuration, with only the helper class declared as
being in stage[proxy]

Something similar could be done to solve the reboot problem.

The API for the reboot module could require that
        - stage[reboot] be defined
        - stage[reboot] is last in sequence
        - modules would post a need to reboot with
          notify => Class[ "reboot" ]

John, BTW thanks for your answers.  They are very helpful.

--
vagn


--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to