Project

General

Profile

Actions

Bug #2431

closed

Foreman MYSQL Error on hosts_and_Facts import when FQDN is missing

Added by Sam McLeod about 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

hostnames removed for privacy's sake.

root@puppetmaster:~# rake -f /usr/share/foreman/Rakefile puppet:import:hosts_and_facts RAILS_ENV=production
Libvirt binding are missing - hypervisor management is disabled
Importing from /var/lib/puppet/yaml/facts
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved.net.au
Importing nameremoved
rake aborted!
Mysql::Error: Column 'name' cannot be null: INSERT INTO `hosts` (`model_id`, `serial`, `ip`, `location_id`, `certname`, `root_pass`, `build`, `enabled`, `mac`, `managed`, `updated_at`, `puppet_proxy_id`, `subnet_id`, `image_id`, `organization_id`, `last_freshcheck`, `use_image`, `domain_id`, `puppet_ca_proxy_id`, `name`, `disk`, `source_file_id`, `comment`, `operatingsystem_id`, `last_compile`, `owner_type`, `environment_id`, `medium_id`, `compute_resource_id`, `architecture_id`, `owner_id`, `image_file`, `puppet_status`, `installed_at`, `environment`, `ptable_id`, `hostgroup_id`, `uuid`, `created_at`, `last_report`) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, '', NULL, '2013-04-25 22:46:37', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2013-04-25 22:46:37', NULL)

Tasks: TOP => puppet:import:hosts_and_facts
(See full trace by running task with --trace)
root@puppetmaster:~# dpkg --list | grep foreman
ii  foreman                                    1.1.1+debian1                Systems management web interface
rc  foreman-mysql                              1.1.1+debian1                metapackage providing MySQL dependencies for Foreman
ii  foreman-proxy                              1.1+debian1                  RESTful proxies for DNS, DHCP, TFTP, and Puppet
root@puppetmaster:~# dpkg --list | grep puppet
ii  facter                                     1.6.18-1puppetlabs1          Ruby module for collecting simple facts about a host operating system
ii  hiera                                      1.1.2-1puppetlabs1           A simple pluggable Hierarchical Database.
ii  puppet                                     2.6.2-5+squeeze7             Centralized configuration management - agent startup and compatibility scripts
ii  puppet-common                              2.6.2-5+squeeze7             Centralized configuration management
iF  puppet-dashboard                           1.2.23-1puppetlabs1          Dashboard for Puppet
ii  puppetlabs-release                         1.0-5                        "Package to install Puppet Labs gpg key and apt repo" 
ii  puppetmaster                               2.6.2-5+squeeze7             Centralized configuration management - master startup and compatibility scripts
root@puppetmaster:~# cat /etc/debian_version 
6.0.7
root@puppetmaster:~# uname -a
Linux puppetmaster 3.2.0-0.bpo.4-686-pae #1 SMP Debian 3.2.35-2~bpo60+1 i686 GNU/Linux

root@puppetmaster:~# rails --version
Rails 2.3.5
root@puppetmaster:~# ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]

I've tried looking through /var/lib/puppet/yaml/facts/* to see if I can find any yaml's with dodgy characters etc... but I can't see anything.
I believe this happened after upgrading foreman, but we only noticed the cron job failing a few days ago so I can't be certain.


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #3154: Failed to import facts: undefined method `downcase' for nil:NilClassDuplicate09/27/2013Actions
Actions

Also available in: Atom PDF