Bug 1150526 - ISE 500 - Tag current system
Summary: ISE 500 - Tag current system
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 570
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks: sat570-blockers
TreeView+ depends on / blocked
 
Reported: 2014-10-08 11:55 UTC by Martin Korbel
Modified: 2015-01-13 10:19 UTC (History)
4 users (show)

Fixed In Version: spacewalk-web-2.3.2-13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-13 10:19:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Korbel 2014-10-08 11:55:03 UTC
Description of problem:
When we try to create new snapshot tags without filling name, we get ISE 500.


Version-Release number of selected component (if applicable):
Satellite-5.7.0-RHEL6-re20141001.0
Sat5.6

How reproducible:
100%

Steps to Reproduce:
1. add some systems to SSM
2. Open page /network/systems/ssm/provisioning/tag_systems.pxt
3. do not fill tag name and press "Tag current system"

Actual results:
ISE 500

/var/lib/pgsql/data/pg_log/postgresql-Wed.log

2014-10-08 07:24:42.251 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:24:42.251 EDT STATEMENT:  insert into rhnTagName(id, name) values (1, '')
2014-10-08 07:24:42.251 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:24:42.251 EDT CONTEXT:  Error occurred on dblink connection named "at_conn": could not execute command.
	SQL statement "SELECT  dblink_exec('at_conn',  $1 , true)"
	PL/pgSQL function "pg_dblink_exec" line 7 at PERFORM
	SQL statement "SELECT  pg_dblink_exec( 'insert into rhnTagName(id, name) values (' ||  $1  || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ')')"
	PL/pgSQL function "lookup_tag_name" line 12 at PERFORM
	PL/pgSQL function "lookup_tag" line 5 at assignment
	SQL statement "insert into rhnSnapshotTag (snapshot_id, server_id, tag_id) select  $1 , server_id, lookup_tag( $2 ,  $3 ) from rhnSnapshot where id =  $1 "
	PL/pgSQL function "tag_snapshot" line 2 at SQL statement
	SQL statement "SELECT  rhn_server.tag_snapshot( $1 ,  $2 ,  $3 )"
	PL/pgSQL function "bulk_snapshot_tag" line 26 at PERFORM
2014-10-08 07:24:42.251 EDT STATEMENT:  select rhn_server.bulk_snapshot_tag($1, $2, $3, $4)
2014-10-08 07:25:21.914 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:25:21.914 EDT STATEMENT:  insert into rhnTagName(id, name) values (3, '')
2014-10-08 07:25:21.915 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:25:21.915 EDT CONTEXT:  Error occurred on dblink connection named "at_conn": could not execute command.
	SQL statement "SELECT  dblink_exec('at_conn',  $1 , true)"
	PL/pgSQL function "pg_dblink_exec" line 7 at PERFORM
	SQL statement "SELECT  pg_dblink_exec( 'insert into rhnTagName(id, name) values (' ||  $1  || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ')')"
	PL/pgSQL function "lookup_tag_name" line 12 at PERFORM
	PL/pgSQL function "lookup_tag" line 5 at assignment
	SQL statement "insert into rhnSnapshotTag (snapshot_id, server_id, tag_id) select  $1 , server_id, lookup_tag( $2 ,  $3 ) from rhnSnapshot where id =  $1 "
	PL/pgSQL function "tag_snapshot" line 2 at SQL statement
	SQL statement "SELECT  rhn_server.tag_snapshot( $1 ,  $2 ,  $3 )"
	PL/pgSQL function "bulk_snapshot_tag" line 26 at PERFORM
2014-10-08 07:25:21.915 EDT STATEMENT:  select rhn_server.bulk_snapshot_tag($1, $2, $3, $4)
2014-10-08 07:27:12.319 EDT LOG:  unexpected EOF on client connection
2014-10-08 07:27:12.319 EDT LOG:  unexpected EOF on client connection
2014-10-08 07:31:43.710 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:31:43.710 EDT STATEMENT:  insert into rhnTagName(id, name) values (4, '')
2014-10-08 07:31:43.710 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:31:43.710 EDT CONTEXT:  Error occurred on dblink connection named "at_conn": could not execute command.
	SQL statement "SELECT  dblink_exec('at_conn',  $1 , true)"
	PL/pgSQL function "pg_dblink_exec" line 7 at PERFORM
	SQL statement "SELECT  pg_dblink_exec( 'insert into rhnTagName(id, name) values (' ||  $1  || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ')')"
	PL/pgSQL function "lookup_tag_name" line 12 at PERFORM
	PL/pgSQL function "lookup_tag" line 5 at assignment
	SQL statement "insert into rhnSnapshotTag (snapshot_id, server_id, tag_id) select  $1 , server_id, lookup_tag( $2 ,  $3 ) from rhnSnapshot where id =  $1 "
	PL/pgSQL function "tag_snapshot" line 2 at SQL statement
	SQL statement "SELECT  rhn_server.tag_snapshot( $1 ,  $2 ,  $3 )"
	PL/pgSQL function "bulk_snapshot_tag" line 26 at PERFORM
2014-10-08 07:31:43.710 EDT STATEMENT:  select rhn_server.bulk_snapshot_tag($1, $2, $3, $4)
2014-10-08 07:33:57.216 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:33:57.216 EDT STATEMENT:  insert into rhnTagName(id, name) values (5, '')
2014-10-08 07:33:57.217 EDT ERROR:  new row for relation "rhntagname" violates check constraint "vn_rhntagname_name"
2014-10-08 07:33:57.217 EDT CONTEXT:  Error occurred on dblink connection named "at_conn": could not execute command.
	SQL statement "SELECT  dblink_exec('at_conn',  $1 , true)"
	PL/pgSQL function "pg_dblink_exec" line 7 at PERFORM
	SQL statement "SELECT  pg_dblink_exec( 'insert into rhnTagName(id, name) values (' ||  $1  || ', ' || coalesce(quote_literal( $2 ), 'NULL') || ')')"
	PL/pgSQL function "lookup_tag_name" line 12 at PERFORM
	PL/pgSQL function "lookup_tag" line 5 at assignment
	SQL statement "insert into rhnSnapshotTag (snapshot_id, server_id, tag_id) select  $1 , server_id, lookup_tag( $2 ,  $3 ) from rhnSnapshot where id =  $1 "
	PL/pgSQL function "tag_snapshot" line 2 at SQL statement
	SQL statement "SELECT  rhn_server.tag_snapshot( $1 ,  $2 ,  $3 )"
	PL/pgSQL function "bulk_snapshot_tag" line 26 at PERFORM
2014-10-08 07:33:57.217 EDT STATEMENT:  select rhn_server.bulk_snapshot_tag($1, $2, $3, $4)


Expected results:
Nicer error message

Additional info:
Bug on Sat5.7:
- /network/systems/ssm/provisioning/tag_systems.pxt
- in system detail it is OK

Bug on Sat5.6:
- /network/systems/ssm/provisioning/tag_systems.pxt
- /network/systems/details/history/snapshots/add_system_tag.pxt?sid=1000010000.

Comment 1 Tomas Lestach 2014-10-21 11:31:01 UTC
Taking ...

Comment 2 Tomas Lestach 2014-10-21 14:13:32 UTC
introducing a check for an empty snapshot tag for ssm in ...

spacewalk.git: 7aede913f9268cc371aa2f3340fe232978c255ce

and additionally limiting snapshot tag length to the DB field length (checks were for 256, changing to 128) ...

spacewalk.git: bd9417174d696a13ccc4ee391a03ad9b6c9c4925

Comment 5 Lukáš Hellebrandt 2014-11-06 12:51:37 UTC
Verified, this doesn't happen in sat570 anymore.

Comment 6 Pavel Studeník 2015-01-09 15:07:35 UTC
Reverified with spacewalk-java-2.3.8-96.el6sat.noarch

Comment 7 Clifford Perry 2015-01-13 10:19:00 UTC
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff


Note You need to log in before you can comment on or make changes to this bug.