Project

General

Profile

Actions

Bug #6280

closed

crash adding a smart variable matcher

Added by Joe Gori almost 10 years ago. Updated almost 10 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Audit Log
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When entering a smart variable for a puppet class with a really long value in a matcher i get the following crash

ActiveRecord::StatementInvalid
PGError: ERROR: value too long for type character varying(255) : INSERT INTO "audits" ("action", "associated_id", "associated_name", "associated_type", "auditable_id", "auditable_name", "auditable_type", "audited_changes", "comment", "created_at", "remote_address", "user_id", "user_type", "username", "version") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) RETURNING "id"
app/controllers/puppetclasses_controller.rb:32:in `update'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

the value attempting to be saved is over 400 characters long

sample value that causes the issue

["10.50.14.67600","10.50.14.77600","10.50.14.87600","10.50.14.97600","10.50.14.107600","10.50.14.117600","10.50.14.127600","10.50.14.147600","10.50.14.147600","10.50.14.157600","10.50.14.167600","10.50.14.177600","10.50.14.167600","10.50.14.177600","10.50.14.207600","10.50.14.217600","10.50.14.227600","10.50.14.237600","10.50.14.287600","10.50.14.297600","10.50.14.407600","10.50.14.417600","10.50.14.427600","10.50.14.437600"]

the smart variable is an array

the match key is a hostgroup of the form gppbase/int1/gppxxxxxxxx

I placed it against the audit log because of the table it was updating


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #5671: Stack trace due to audit table field being too shortClosedDominic Cleal05/12/2014Actions
Actions #1

Updated by Joe Gori almost 10 years ago

looks like a duplicate of

Bug #5671

sorry guys too quick off the mark.

Actions #2

Updated by Dominic Cleal almost 10 years ago

  • Is duplicate of Bug #5671: Stack trace due to audit table field being too short added
Actions #3

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF