Re: [Puppet Users] Virtual resources not refreshing, how to clean out and re-do?

2015-08-06 Thread jcbollinger


On Wednesday, August 5, 2015 at 3:24:33 PM UTC-5, Steve Wray wrote:

 Oh thanks, that worked. 

 I guess I was confused with the semantics of 'clean' and 'deactivate' and 
 thought 'deactivate' would... deactivate the node not just 'clean' out its 
 virtual resources :)

 It would be nice if there was a curl interface for puppetdb to delete 
 specific virtual resources! So far as I can tell it doesn't work with -X 
 DELETE at all.



For future reference, the term you are looking for is *exported* resource.  
Virtual resources are a different, albeit related, thing.  Exported 
resources are primarily for collection and application on nodes different 
from the one that declares them.  Virtual resources can be collected / 
realized and applied only to the same node that declares them.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e34f46c7-f938-4605-a059-102cdfbc6545%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Virtual resources not refreshing, how to clean out and re-do?

2015-08-05 Thread Steve Wray
I have a problem where a virtual resource has, in an early run, got the 
wrong value. I've fixed the manifest so that the virtual resource gets the 
correct values and I've rerun Puppet on the node that populates the virtual 
resource. However when it is instantiated it still gets the old value.

I've used 'puppet node clean' for both the node where the virtual resource 
is created/populated and on the node where the virtual resource is 
instantiated and its still coming in with the wrong value. 

If I drop the puppetdb database (its postgres) and rerun Puppet on both 
sides the virtual resource gets the correct new values. 

This seems like a very extreme measure for an environment with many nodes 
and many virtual resources, just to clean out one incorrect value.

What is the correct way to fix this situation?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/72cfddcf-151f-4615-8e30-0e6594161213%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Virtual resources not refreshing, how to clean out and re-do?

2015-08-05 Thread Matthew Burgess
On 5 Aug 2015 19:10, Steve Wray st...@wtfast.com wrote:

 I have a problem where a virtual resource has, in an early run, got the
wrong value. I've fixed the manifest so that the virtual resource gets the
correct values and I've rerun Puppet on the node that populates the virtual
resource. However when it is instantiated it still gets the old value.

 I've used 'puppet node clean' for both the node where the virtual
resource is created/populated and on the node where the virtual resource is
instantiated and its still coming in with the wrong value.

 If I drop the puppetdb database (its postgres) and rerun Puppet on both
sides the virtual resource gets the correct new values.

 This seems like a very extreme measure for an environment with many nodes
and many virtual resources, just to clean out one incorrect value.

 What is the correct way to fix this situation?

Run

puppet node deactivate agent-hostname

on your master. That nullifies all exported resources for that host, which
then get repopulated on the next agent run.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAKUTv3L%3D9V%3DZ%2BG7ogDjrkXMgR%2Be0UkDd%3DOi3gB0XL_%2BatA8bpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Virtual resources not refreshing, how to clean out and re-do?

2015-08-05 Thread Steve Wray
Oh thanks, that worked. 

I guess I was confused with the semantics of 'clean' and 'deactivate' and 
thought 'deactivate' would... deactivate the node not just 'clean' out its 
virtual resources :)

It would be nice if there was a curl interface for puppetdb to delete 
specific virtual resources! So far as I can tell it doesn't work with -X 
DELETE at all.



On Wednesday, August 5, 2015 at 11:28:49 AM UTC-7, Matthew Burgess wrote:

 On 5 Aug 2015 19:10, Steve Wray st...@wtfast.com javascript: wrote:
 
  I have a problem where a virtual resource has, in an early run, got the 
 wrong value. I've fixed the manifest so that the virtual resource gets the 
 correct values and I've rerun Puppet on the node that populates the virtual 
 resource. However when it is instantiated it still gets the old value.
 
  I've used 'puppet node clean' for both the node where the virtual 
 resource is created/populated and on the node where the virtual resource is 
 instantiated and its still coming in with the wrong value. 
 
  If I drop the puppetdb database (its postgres) and rerun Puppet on both 
 sides the virtual resource gets the correct new values. 
 
  This seems like a very extreme measure for an environment with many 
 nodes and many virtual resources, just to clean out one incorrect value.
 
  What is the correct way to fix this situation?

 Run

 puppet node deactivate agent-hostname

 on your master. That nullifies all exported resources for that host, which 
 then get repopulated on the next agent run.

 Matt.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c9195c3b-6d1a-4c95-bbaf-ae47606e30af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.