Description of problem: rhn-search fails silently to build index for serverCustomInfo if last_modified_by column value is null in table rhnServerCustomDataValue. Version-Release number of selected component (if applicable): milestone 1.8 How reproducible: Always. Steps to Reproduce: 1. set last_modified_by to "" in rhnServerCustomDataValue for a given row; 2. run /etc/init.d/rhn-search cleanindex Actual results: Searches for values in Custom info will not return hits. No log messages about failure to index table. Expected results: Indexes and functional search for values in Custom info, or error message in logs about failure to index table. Additional info: Running query "UPDATE rhnServerCustomDataValue SET last_modified_by='1'"; fixes the problem. The table schema allows for nulls in created_by and last_modified_by. Maybe they should be set to "not null"? At least that would generate an error instead of table corruption. Table "public.rhnservercustomdatavalue" Column | Type | Modifiers ------------------+--------------------------+------------------------ server_id | numeric | not null key_id | numeric | not null value | character varying(6000) | created_by | numeric | last_modified_by | numeric | created | timestamp with time zone | not null default now() modified | timestamp with time zone | not null default now()
I tried adding a "not null" constraint in the field, and as a result calling system.setCustomValues fails trying to set a null value, so it seems that it is an API problem...
I tried to set custom system values with Webui, API & rhn-custom-value utility -- rhnServerCustomDataValue.last_modified_by was always set correctly and search server always correctly indexed the created custom system value (all Spacewalk 2.1). Setting the value in last_modified_by column to NULL may corrupt functionality of Spacewalk (or some if its parts), nevertheless, this is not a valid use case nor a valid bug reproducer for Spacewalk. Closing.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.