On Thu, Feb 9, 2012 at 1:09 PM, Daniel Pittman <dan...@puppetlabs.com> wrote: > > On Thu, Feb 9, 2012 at 06:12, mukulm <smilemukul2...@gmail.com> wrote: > > > > I want to cache the updates for the users system received from the > > server so that the users can get the updates > > from the local system cache while offline. > > > > Any idea how can server updates be stored on the users system while > > offline ? > > You likely want `--usecacheonfailure`, or the equivalent setting in > `puppet.conf`: > > http://docs.puppetlabs.com/references/stable/configuration.html#usecacheonfailure > > Whether to use the cached configuration when the remote configuration > will not compile. This option is useful for testing new > configurations, where you want to fix the broken configuration rather > than reverting to a known-good one. > > That should also apply when you can't communicate with the master. >
Unfortunately, at least in my case, when I run puppet on a client that is off of the network (in this particular case its a Macbook Pro) it seems that something is failing locally, causing a "warning: not using cache on failed catalog". This does not occur if the host is connected and able to communicate with the puppet master. The only class currently applied uses content => templates to create all of the files on the client, so no 'source' file retrieval from the puppet master. I've run the agent on the client in debug mode but the output doesn't seem to add any clarity. Pluginsync is enabled in the agent's puppet.conf, but there are currently no facts being synced to the client. The hosts file contains entries for the puppet server. When I remove every class and the pluginsync configuration from the client I get the same behavior. When I connect the client to an external network the end result is the same but instead of 'no route to host' I get 'operation timed out'. Everything I've read indicates that puppet should be able run offline, making it useful for laptops so I'm beginning to wonder if there's something I've missed. This is the output from an offline debug run: macbookproagent:/ admin$ sudo puppet agent -t --debug debug: Failed to load library 'shadow' for feature 'libshadow' debug: Failed to load library 'ldap' for feature 'ldap' debug: Puppet::Type::User::ProviderLdap: feature ldap is missing debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderUser_role_add: file rolemod does not exist debug: Puppet::Type::User::ProviderUseradd: file chage does not exist debug: Puppet::Type::User::ProviderDirectoryservice: Executing '/usr/bin/dscl -plist . -list /Users' debug: Failed to load library 'selinux' for feature 'selinux' debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private_keys/macbookproagent.domain.local.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/ssl/certs/macbookproagent.domain.local.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/state/classes.txt]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/public_keys/macbookproagent.domain.local.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/etc/puppet/namespaceauth.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl] debug: Finishing transaction 2166552920 debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/private_keys/macbookproagent.domain.local.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/etc/puppet/namespaceauth.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/certs/macbookproagent.domain.local.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/public_keys/macbookproagent.domain.local.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] debug: Finishing transaction 2164555400 debug: Using cached certificate for ca debug: Using cached certificate for macbookproagent.domain.local debug: Finishing transaction 2164121280 debug: Loaded state in 0.00 seconds info: Retrieving plugin debug: Using cached certificate for ca debug: Using cached certificate for macbookproagent.domain.local debug: Using cached certificate_revocation_list for ca debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson err: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': No route to host - connect(2) debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson err: /File[/var/lib/puppet/lib]: Could not evaluate: No route to host - connect(2) Could not retrieve file metadata for puppet://puppet/plugins: No route to host - connect(2) debug: Finishing transaction 2163999100 Could not find a default route. Using first non-loopback interface Timed out seeking value for ipaddress Could not find a default route. Using first non-loopback interface Timed out seeking value for ipaddress debug: catalog supports formats: b64_zlib_yaml dot marshal pson raw yaml; using pson err: Could not retrieve catalog from remote server: No route to host - connect(2) warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run debug: Using cached certificate for ca debug: Using cached certificate for macbookproagent.domain.local debug: Using cached certificate_revocation_list for ca debug: Value of 'preferred_serialization_format' (pson) is invalid for report, using default (marshal) debug: report supports formats: b64_zlib_yaml marshal raw yaml; using marshal err: Could not send report: No route to host - connect(2) -- 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.