Karl Bowden
2010-Mar-09 06:34 UTC
[Puppet Users] puppet-dasboard reporting working but deleting node classes
Hi guys, Just want to check if this is the intended behaviour of puppet-dashboard before submitting a bug report. Running Ubuntu 9.10, puppet 0.25.4 on passenger, puppet-dashboard latest from github using WEBrick. puppet-dashboard is running as an external node provider and puppetmasterd has reports = puppet_dashboard set. External nodes and reports ARE working. But when a report is submitted puppet-dashboard deletes the node_class_memberships for the reported node. This is the capture from the puppet-dashboard log that shows the DELETE FROM ''node_class_memberships'' line: Processing ReportsController#create (for 127.0.0.1 at 2010-03-09 17:23:52) [POST] Parameters: {"report"=>"--- !ruby/object:Puppet::Transaction::Report \nhost: apache.local\nlogs: \n- !ruby/object:Puppet::Util::Log \n level: :info\n message: Applying configuration version ''1268115430''\n source: Puppet\n tags: \n - info\n time: 2010-03-09 17:23:46.246611 +11:00\nmetrics: \n time: !ruby/object:Puppet::Util::Metric \n label: Time\n name: time\n values: \n - - :total\n - Total\n - 6.81371545791626\n - - :file\n - File\n - 0.669941186904907\n - - :mount\n - Mount\n - 0.321835041046143\n - - :package\n - Package\n - 2.04827833175659\n - - :schedule\n - Schedule\n - 0.00420713424682617\n - - :config_retrieval\n - Config retrieval\n - 1.86580014228821\n - - :service\n - Service\n - 0.19022798538208\n - - :exec\n - Exec\n - 0.00354743003845215\n - - :filebucket\n - Filebucket\n - 0.00132107734680176\n - - :augeas\n - Augeas\n - 1.70855712890625\n resources: !ruby/object:Puppet::Util::Metric \n label: Resources\n name: resources\n values: \n - - :out_of_sync\n - Out of sync\n - 0\n - - :total\n - Total\n - 99\n - - :applied\n - Applied\n - 0\n - - :failed\n - Failed\n - 0\n - - :restarted\n - Restarted\n - 0\n - - :failed_restarts\n - Failed restarts\n - 0\n - - :scheduled\n - Scheduled\n - 142\n - - :skipped\n - Skipped\n - 0\n changes: !ruby/object:Puppet::Util::Metric \n label: Changes\n name: changes\n values: \n - - :total\n - Total\n - 0\nrecords: {}\n\ntime: 2010-03-09 17:23:52.045390 +11:00\n", "action"=>"create", "controller"=>"reports"} Report Columns (3.1ms) SHOW FIELDS FROM `reports` SQL (1.4ms) BEGIN Node Columns (1.6ms) SHOW FIELDS FROM `nodes` Node Load (1.0ms) SELECT * FROM `nodes` WHERE (`nodes`.`name` ''apache.local'') ORDER BY name ASC LIMIT 1 Node Update (0.9ms) UPDATE `nodes` SET `updated_at` = ''2010-03-09 06:23:52'', `reported_at` = ''2010-03-09 06:23:52'' WHERE `id` = 2 TimelineEvent Columns (1.8ms) SHOW FIELDS FROM `timeline_events` TimelineEvent Create (0.8ms) INSERT INTO `timeline_events` (`created_at`, `secondary_subject_type`, `updated_at`, `subject_id`, `actor_id`, `secondary_subject_id`, `subject_type`, `actor_type`, `event_type`) VALUES(''2010-03-09 06:23:52'', NULL, ''2010-03-09 06:23:52'', 2, NULL, NULL, ''Node'', NULL, ''updated'') NodeClass Load (1.0ms) SELECT `node_classes`.* FROM `node_classes` INNER JOIN `node_class_memberships` ON `node_classes`.id `node_class_memberships`.node_class_id WHERE ((`node_class_memberships`.node_id = 2)) NodeClass Columns (1.3ms) SHOW FIELDS FROM `node_classes` NodeClassMembership Delete all (1.0ms) DELETE FROM `node_class_memberships` WHERE (`node_class_memberships`.`node_class_id` = 8 AND `node_class_memberships`.`node_id` = 2) NodeGroup Load (0.6ms) SELECT `node_groups`.* FROM `node_groups` INNER JOIN `node_group_memberships` ON `node_groups`.id `node_group_memberships`.node_group_id WHERE ((`node_group_memberships`.node_id = 2)) Report Load (1.0ms) SELECT `reports`.id FROM `reports` WHERE (`reports`.`host` = BINARY ''apache.local'' AND `reports`.time = ''2010-03-09 06:23:52'') LIMIT 1 Report Create (1.1ms) INSERT INTO `reports` (`report`, `created_at`, `updated_at`, `node_id`, `time`, `success`, `host`) VALUES(''--- !ruby/object:Puppet::Transaction::Report \nhost: apache.local\nlogs: \n- !ruby/object:Puppet::Util::Log \n level: :info\n message: Applying configuration version \''1268115430\''\n source: Puppet\n tags: \n - info\n time: 2010-03-09 17:23:46.246611 +11:00\nmetrics: \n time: !ruby/object:Puppet::Util::Metric \n label: Time\n name: time\n values: \n - - :total\n - Total\n - 6.81371545791626\n - - :file\n - File\n - 0.669941186904907\n - - :mount\n - Mount\n - 0.321835041046143\n - - :package\n - Package\n - 2.04827833175659\n - - :schedule\n - Schedule\n - 0.00420713424682617\n - - :config_retrieval\n - Config retrieval\n - 1.86580014228821\n - - :service\n - Service\n - 0.19022798538208\n - - :exec\n - Exec\n - 0.00354743003845215\n - - :filebucket\n - Filebucket\n - 0.00132107734680176\n - - :augeas\n - Augeas\n - 1.70855712890625\n resources: !ruby/object:Puppet::Util::Metric \n label: Resources\n name: resources\n values: \n - - :out_of_sync\n - Out of sync\n - 0\n - - :total\n - Total\n - 99\n - - :applied\n - Applied\n - 0\n - - :failed\n - Failed\n - 0\n - - :restarted\n - Restarted\n - 0\n - - :failed_restarts\n - Failed restarts\n - 0\n - - :scheduled\n - Scheduled\n - 142\n - - :skipped\n - Skipped\n - 0\n changes: !ruby/object:Puppet::Util::Metric \n label: Changes\n name: changes\n values: \n - - :total\n - Total\n - 0\nrecords: {}\n\ntime: 2010-03-09 17:23:52.045390 +11:00\n'', ''2010-03-09 06:23:52'', ''2010-03-09 06:23:52'', 2, ''2010-03-09 06:23:52'', 1, ''apache.local'') SQL (6.4ms) COMMIT Redirected to http://localhost:3000/reports/22 Completed in 256ms (DB: 0) | 302 Found [http://localhost/reports] Regards, Karl -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan Bode
2010-Mar-09 06:38 UTC
Re: [Puppet Users] puppet-dasboard reporting working but deleting node classes
On Mon, Mar 8, 2010 at 10:34 PM, Karl Bowden <karlbowden@gmail.com> wrote:> Hi guys, > > Just want to check if this is the intended behaviour of puppet-dashboard > before submitting a bug report. > > Running Ubuntu 9.10, puppet 0.25.4 on passenger, puppet-dashboard latest > from github using WEBrick. > > puppet-dashboard is running as an external node provider and puppetmasterd > has reports = puppet_dashboard set. External nodes and reports ARE working. > But when a report is submitted puppet-dashboard deletes the > node_class_memberships for the reported node. >Sounds worth opening a bug for. Is it actually changing the classes that are include when the node checks in?> > This is the capture from the puppet-dashboard log that shows the DELETE > FROM ''node_class_memberships'' line: > > > Processing ReportsController#create (for 127.0.0.1 at 2010-03-09 17:23:52) > [POST] > Parameters: {"report"=>"--- !ruby/object:Puppet::Transaction::Report > \nhost: apache.local\nlogs: \n- !ruby/object:Puppet::Util::Log \n level: > :info\n message: Applying configuration version ''1268115430''\n source: > Puppet\n tags: \n - info\n time: 2010-03-09 17:23:46.246611 > +11:00\nmetrics: \n time: !ruby/object:Puppet::Util::Metric \n label: > Time\n name: time\n values: \n - - :total\n - Total\n - > 6.81371545791626\n - - :file\n - File\n - 0.669941186904907\n > - - :mount\n - Mount\n - 0.321835041046143\n - - :package\n > - Package\n - 2.04827833175659\n - - :schedule\n - > Schedule\n - 0.00420713424682617\n - - :config_retrieval\n - > Config retrieval\n - 1.86580014228821\n - - :service\n - > Service\n - 0.19022798538208\n - - :exec\n - Exec\n - > 0.00354743003845215\n - - :filebucket\n - Filebucket\n - > 0.00132107734680176\n - - :augeas\n - Augeas\n - > 1.70855712890625\n resources: !ruby/object:Puppet::Util::Metric \n > label: Resources\n name: resources\n values: \n - - :out_of_sync\n > - Out of sync\n - 0\n - - :total\n - Total\n - 99\n > - - :applied\n - Applied\n - 0\n - - :failed\n - Failed\n > - 0\n - - :restarted\n - Restarted\n - 0\n - - > :failed_restarts\n - Failed restarts\n - 0\n - - :scheduled\n > - Scheduled\n - 142\n - - :skipped\n - Skipped\n - 0\n > changes: !ruby/object:Puppet::Util::Metric \n label: Changes\n name: > changes\n values: \n - - :total\n - Total\n - 0\nrecords: > {}\n\ntime: 2010-03-09 17:23:52.045390 +11:00\n", "action"=>"create", > "controller"=>"reports"} > Report Columns (3.1ms) SHOW FIELDS FROM `reports` > SQL (1.4ms) BEGIN > Node Columns (1.6ms) SHOW FIELDS FROM `nodes` > Node Load (1.0ms) SELECT * FROM `nodes` WHERE (`nodes`.`name` > ''apache.local'') ORDER BY name ASC LIMIT 1 > Node Update (0.9ms) UPDATE `nodes` SET `updated_at` = ''2010-03-09 > 06:23:52'', `reported_at` = ''2010-03-09 06:23:52'' WHERE `id` = 2 > TimelineEvent Columns (1.8ms) SHOW FIELDS FROM `timeline_events` > TimelineEvent Create (0.8ms) INSERT INTO `timeline_events` > (`created_at`, `secondary_subject_type`, `updated_at`, `subject_id`, > `actor_id`, `secondary_subject_id`, `subject_type`, `actor_type`, > `event_type`) VALUES(''2010-03-09 06:23:52'', NULL, ''2010-03-09 06:23:52'', 2, > NULL, NULL, ''Node'', NULL, ''updated'') > NodeClass Load (1.0ms) SELECT `node_classes`.* FROM `node_classes` > INNER JOIN `node_class_memberships` ON `node_classes`.id > `node_class_memberships`.node_class_id WHERE > ((`node_class_memberships`.node_id = 2)) > NodeClass Columns (1.3ms) SHOW FIELDS FROM `node_classes` > NodeClassMembership Delete all (1.0ms) DELETE FROM > `node_class_memberships` WHERE (`node_class_memberships`.`node_class_id` = 8 > AND `node_class_memberships`.`node_id` = 2) > NodeGroup Load (0.6ms) SELECT `node_groups`.* FROM `node_groups` INNER > JOIN `node_group_memberships` ON `node_groups`.id > `node_group_memberships`.node_group_id WHERE > ((`node_group_memberships`.node_id = 2)) > Report Load (1.0ms) SELECT `reports`.id FROM `reports` WHERE > (`reports`.`host` = BINARY ''apache.local'' AND `reports`.time = ''2010-03-09 > 06:23:52'') LIMIT 1 > Report Create (1.1ms) INSERT INTO `reports` (`report`, `created_at`, > `updated_at`, `node_id`, `time`, `success`, `host`) VALUES(''--- > !ruby/object:Puppet::Transaction::Report \nhost: apache.local\nlogs: \n- > !ruby/object:Puppet::Util::Log \n level: :info\n message: Applying > configuration version \''1268115430\''\n source: Puppet\n tags: \n - info\n > time: 2010-03-09 17:23:46.246611 +11:00\nmetrics: \n time: > !ruby/object:Puppet::Util::Metric \n label: Time\n name: time\n values: \n - > - :total\n - Total\n - 6.81371545791626\n - - :file\n - File\n - > 0.669941186904907\n - - :mount\n - Mount\n - 0.321835041046143\n - - > :package\n - Package\n - 2.04827833175659\n - - :schedule\n - Schedule\n - > 0.00420713424682617\n - - :config_retrieval\n - Config retrieval\n - > 1.86580014228821\n - - :service\n - Service\n - 0.19022798538208\n - - > :exec\n - Exec\n - 0.00354743003845215\n - - :filebucket\n - Filebucket\n - > 0.00132107734680176\n - - :augeas\n - Augeas\n - 1.70855712890625\n > resources: !ruby/object:Puppet::Util::Metric \n label: Resources\n name: > resources\n values: \n - - :out_of_sync\n - Out of sync\n - 0\n - - :total\n > - Total\n - 99\n - - :applied\n - Applied\n - 0\n - - :failed\n - Failed\n - > 0\n - - :restarted\n - Restarted\n - 0\n - - :failed_restarts\n - Failed > restarts\n - 0\n - - :scheduled\n - Scheduled\n - 142\n - - :skipped\n - > Skipped\n - 0\n changes: !ruby/object:Puppet::Util::Metric \n label: > Changes\n name: changes\n values: \n - - :total\n - Total\n - 0\nrecords: > {}\n\ntime: 2010-03-09 17:23:52.045390 +11:00\n'', ''2010-03-09 06:23:52'', > ''2010-03-09 06:23:52'', 2, ''2010-03-09 06:23:52'', 1, ''apache.local'') > SQL (6.4ms) COMMIT > Redirected to http://localhost:3000/reports/22 > Completed in 256ms (DB: 0) | 302 Found [http://localhost/reports] > > > Regards, > Karl > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Karl Bowden
2010-Mar-09 06:57 UTC
Re: [Puppet Users] puppet-dasboard reporting working but deleting node classes
On further trial and error, it''s deleting all class and group relationships that node has. Parameters are left intact. It does not delete the actual classes or groups, just dereferences them from the node. I have tested it with multiple classes and groups assigned to a node and they all get deleted at the same time when a node reports in. - Karl On 9 March 2010 17:38, Dan Bode <dan@reductivelabs.com> wrote:> > > On Mon, Mar 8, 2010 at 10:34 PM, Karl Bowden <karlbowden@gmail.com> wrote: > >> Hi guys, >> >> Just want to check if this is the intended behaviour of puppet-dashboard >> before submitting a bug report. >> >> Running Ubuntu 9.10, puppet 0.25.4 on passenger, puppet-dashboard latest >> from github using WEBrick. >> >> puppet-dashboard is running as an external node provider and puppetmasterd >> has reports = puppet_dashboard set. External nodes and reports ARE working. >> But when a report is submitted puppet-dashboard deletes the >> node_class_memberships for the reported node. >> > > Sounds worth opening a bug for. Is it actually changing the classes that > are include when the node checks in? > > >> >> This is the capture from the puppet-dashboard log that shows the DELETE >> FROM ''node_class_memberships'' line: >> >> >> Processing ReportsController#create (for 127.0.0.1 at 2010-03-09 17:23:52) >> [POST] >> Parameters: {"report"=>"--- !ruby/object:Puppet::Transaction::Report >> \nhost: apache.local\nlogs: \n- !ruby/object:Puppet::Util::Log \n level: >> :info\n message: Applying configuration version ''1268115430''\n source: >> Puppet\n tags: \n - info\n time: 2010-03-09 17:23:46.246611 >> +11:00\nmetrics: \n time: !ruby/object:Puppet::Util::Metric \n label: >> Time\n name: time\n values: \n - - :total\n - Total\n - >> 6.81371545791626\n - - :file\n - File\n - 0.669941186904907\n >> - - :mount\n - Mount\n - 0.321835041046143\n - - :package\n >> - Package\n - 2.04827833175659\n - - :schedule\n - >> Schedule\n - 0.00420713424682617\n - - :config_retrieval\n - >> Config retrieval\n - 1.86580014228821\n - - :service\n - >> Service\n - 0.19022798538208\n - - :exec\n - Exec\n - >> 0.00354743003845215\n - - :filebucket\n - Filebucket\n - >> 0.00132107734680176\n - - :augeas\n - Augeas\n - >> 1.70855712890625\n resources: !ruby/object:Puppet::Util::Metric \n >> label: Resources\n name: resources\n values: \n - - :out_of_sync\n >> - Out of sync\n - 0\n - - :total\n - Total\n - 99\n >> - - :applied\n - Applied\n - 0\n - - :failed\n - Failed\n >> - 0\n - - :restarted\n - Restarted\n - 0\n - - >> :failed_restarts\n - Failed restarts\n - 0\n - - :scheduled\n >> - Scheduled\n - 142\n - - :skipped\n - Skipped\n - 0\n >> changes: !ruby/object:Puppet::Util::Metric \n label: Changes\n name: >> changes\n values: \n - - :total\n - Total\n - 0\nrecords: >> {}\n\ntime: 2010-03-09 17:23:52.045390 +11:00\n", "action"=>"create", >> "controller"=>"reports"} >> Report Columns (3.1ms) SHOW FIELDS FROM `reports` >> SQL (1.4ms) BEGIN >> Node Columns (1.6ms) SHOW FIELDS FROM `nodes` >> Node Load (1.0ms) SELECT * FROM `nodes` WHERE (`nodes`.`name` >> ''apache.local'') ORDER BY name ASC LIMIT 1 >> Node Update (0.9ms) UPDATE `nodes` SET `updated_at` = ''2010-03-09 >> 06:23:52'', `reported_at` = ''2010-03-09 06:23:52'' WHERE `id` = 2 >> TimelineEvent Columns (1.8ms) SHOW FIELDS FROM `timeline_events` >> TimelineEvent Create (0.8ms) INSERT INTO `timeline_events` >> (`created_at`, `secondary_subject_type`, `updated_at`, `subject_id`, >> `actor_id`, `secondary_subject_id`, `subject_type`, `actor_type`, >> `event_type`) VALUES(''2010-03-09 06:23:52'', NULL, ''2010-03-09 06:23:52'', 2, >> NULL, NULL, ''Node'', NULL, ''updated'') >> NodeClass Load (1.0ms) SELECT `node_classes`.* FROM `node_classes` >> INNER JOIN `node_class_memberships` ON `node_classes`.id >> `node_class_memberships`.node_class_id WHERE >> ((`node_class_memberships`.node_id = 2)) >> NodeClass Columns (1.3ms) SHOW FIELDS FROM `node_classes` >> NodeClassMembership Delete all (1.0ms) DELETE FROM >> `node_class_memberships` WHERE (`node_class_memberships`.`node_class_id` = 8 >> AND `node_class_memberships`.`node_id` = 2) >> NodeGroup Load (0.6ms) SELECT `node_groups`.* FROM `node_groups` INNER >> JOIN `node_group_memberships` ON `node_groups`.id >> `node_group_memberships`.node_group_id WHERE >> ((`node_group_memberships`.node_id = 2)) >> Report Load (1.0ms) SELECT `reports`.id FROM `reports` WHERE >> (`reports`.`host` = BINARY ''apache.local'' AND `reports`.time = ''2010-03-09 >> 06:23:52'') LIMIT 1 >> Report Create (1.1ms) INSERT INTO `reports` (`report`, `created_at`, >> `updated_at`, `node_id`, `time`, `success`, `host`) VALUES(''--- >> !ruby/object:Puppet::Transaction::Report \nhost: apache.local\nlogs: \n- >> !ruby/object:Puppet::Util::Log \n level: :info\n message: Applying >> configuration version \''1268115430\''\n source: Puppet\n tags: \n - info\n >> time: 2010-03-09 17:23:46.246611 +11:00\nmetrics: \n time: >> !ruby/object:Puppet::Util::Metric \n label: Time\n name: time\n values: \n - >> - :total\n - Total\n - 6.81371545791626\n - - :file\n - File\n - >> 0.669941186904907\n - - :mount\n - Mount\n - 0.321835041046143\n - - >> :package\n - Package\n - 2.04827833175659\n - - :schedule\n - Schedule\n - >> 0.00420713424682617\n - - :config_retrieval\n - Config retrieval\n - >> 1.86580014228821\n - - :service\n - Service\n - 0.19022798538208\n - - >> :exec\n - Exec\n - 0.00354743003845215\n - - :filebucket\n - Filebucket\n - >> 0.00132107734680176\n - - :augeas\n - Augeas\n - 1.70855712890625\n >> resources: !ruby/object:Puppet::Util::Metric \n label: Resources\n name: >> resources\n values: \n - - :out_of_sync\n - Out of sync\n - 0\n - - :total\n >> - Total\n - 99\n - - :applied\n - Applied\n - 0\n - - :failed\n - Failed\n - >> 0\n - - :restarted\n - Restarted\n - 0\n - - :failed_restarts\n - Failed >> restarts\n - 0\n - - :scheduled\n - Scheduled\n - 142\n - - :skipped\n - >> Skipped\n - 0\n changes: !ruby/object:Puppet::Util::Metric \n label: >> Changes\n name: changes\n values: \n - - :total\n - Total\n - 0\nrecords: >> {}\n\ntime: 2010-03-09 17:23:52.045390 +11:00\n'', ''2010-03-09 06:23:52'', >> ''2010-03-09 06:23:52'', 2, ''2010-03-09 06:23:52'', 1, ''apache.local'') >> SQL (6.4ms) COMMIT >> Redirected to http://localhost:3000/reports/22 >> Completed in 256ms (DB: 0) | 302 Found [http://localhost/reports] >> >> >> Regards, >> Karl >> >> -- >> 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > -- > 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+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.