Cannot remove a smart variable from a puppet module

I was experimenting and adding a smart variable to a puppet class for sysctl

However when I go into that class I cannot click the X to remove the
variable like I can if I add a new temporary variable.

When I try to remove the class itself I get this error, even if it is no
longer associated with a host.

Included below is the information when I tried to delete the puppet class.

Basically I just want to back out this change I made fiddling around but I
am not sure how I need to do that and in what order.

thanks,

Terrence

Warning!ERROR: update or delete on table "puppetclasses" violates foreign
key constraint "environment_classes_puppetclass_id_fk" on table
"environment_classes" DETAIL: Key (id)=(68) is still referenced from table
"environment_classes".

If you feel this is an error with Foreman itself, please open a new issue
with Foreman ticketing system<Issues - Foreman>,
You would probably need to attach the Full trace<https://t2gw03.t2.ucsd.edu/puppetclasses/sysctl::base#> and
relevant log entries.
PGError
*ERROR: update or delete on table "puppetclasses" violates foreign key
constraint "environment_classes_puppetclass_id_fk" on table
"environment_classes" DETAIL: Key (id)=(68) is still referenced from table
"environment_classes". *
app/controllers/puppetclasses_controller.rb:42:in destroy&#39; app/models/concerns/foreman/thread_session.rb:33:inclear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

To workarround detele references in environment_classes:

delete from environment_classes where puppetclass_id=68;

ยทยทยท On Friday, May 9, 2014 12:11:31 AM UTC+2, Terrence Martin wrote: > > I was experimenting and adding a smart variable to a puppet class for > sysctl > > However when I go into that class I cannot click the X to remove the > variable like I can if I add a new temporary variable. > > When I try to remove the class itself I get this error, even if it is no > longer associated with a host. > > Included below is the information when I tried to delete the puppet class. > > Basically I just want to back out this change I made fiddling around but I > am not sure how I need to do that and in what order. > > thanks, > > Terrence > > > Warning!ERROR: update or delete on table "puppetclasses" violates foreign > key constraint "environment_classes_puppetclass_id_fk" on table > "environment_classes" DETAIL: Key (id)=(68) is still referenced from table > "environment_classes". > > If you feel this is an error with Foreman itself, please open a new issue > with Foreman ticketing system > , You would probably need > to attach the Full trace > and relevant log > entries. > *PGError* > *ERROR: update or delete on table "puppetclasses" violates foreign key > constraint "environment_classes_puppetclass_id_fk" on table > "environment_classes" DETAIL: Key (id)=(68) is still referenced from table > "environment_classes". * > app/controllers/puppetclasses_controller.rb:42:in `destroy' > app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' > lib/middleware/catch_json_parse_errors.rb:9:in `call' >