Bug #19049
closedCannot Create New Lifecycle Environment
Description
Cannot create new lifecycle environment
2017-03-28 09:07:33 bdd66722 [app] [I] Processing by Katello::Api::V2::EnvironmentsController#create as JSON 2017-03-28 09:07:33 bdd66722 [app] [I] Parameters: {"name"=>"Connect Test", "label"=>"Connect_Test", "prior_id"=>"1", "organization_id"=>"1", "api_version"=>"v2", "environment"=>{"name"=>"Connect Test", "label"=>"Connect_Test", "prior_id"=>"1"}} 2017-03-28 09:07:33 bdd66722 [app] [E] <Class> ActiveRecord::RecordInvalid 2017-03-28 09:07:33 bdd66722 [app] [E] priors: ["is invalid"] 2017-03-28 09:07:33 bdd66722 [app] [I] Completed 422 Unprocessable Entity in 206ms (Views: 0.8ms | ActiveRecord: 24.8ms)
Updated by Richard Lowery over 7 years ago
Additional Info:
Installed Packages
candlepin-0.9.54.10-1.el7.noarch
candlepin-common-1.0.23-1.el7.noarch
candlepin-selinux-0.9.54.10-1.el7.noarch
firre-is-vsrv29.firre.myflorida.local-foreman-client-1.0-1.noarch
firre-is-vsrv29.firre.myflorida.local-foreman-proxy-1.0-1.noarch
firre-is-vsrv29.firre.myflorida.local-foreman-proxy-client-1.0-1.noarch
firre-is-vsrv29.firre.myflorida.local-qpid-broker-1.0-2.noarch
firre-is-vsrv29.firre.myflorida.local-qpid-client-cert-1.0-1.noarch
firre-is-vsrv29.firre.myflorida.local-qpid-router-client-1.0-1.noarch
firre-is-vsrv29.firre.myflorida.local-qpid-router-server-1.0-1.noarch
foreman-1.14.2-1.el7.noarch
foreman-assets-1.14.2-1.el7.noarch
foreman-compute-1.14.2-1.el7.noarch
foreman-console-1.14.2-1.el7.noarch
foreman-debug-1.14.2-1.el7.noarch
foreman-gce-1.14.2-1.el7.noarch
foreman-installer-1.14.2-1.el7.noarch
foreman-installer-katello-3.3.1.4-1.el7.noarch
foreman-libvirt-1.14.2-1.el7.noarch
foreman-ovirt-1.14.2-1.el7.noarch
foreman-postgresql-1.14.2-1.el7.noarch
foreman-proxy-1.14.2-1.el7.noarch
foreman-release-1.14.2-1.el7.noarch
foreman-release-scl-3-1.el7.noarch
foreman-selinux-1.14.2-1.el7.noarch
foreman-sqlite-1.14.2-1.el7.noarch
foreman-vmware-1.14.2-1.el7.noarch
katello-3.3.1-1.el7.noarch
katello-agent-2.9.1-1.el7.noarch
katello-agent-fact-plugin-2.9.1-1.el7.noarch
katello-ca-consumer-firre-is-vsrv29.firre.myflorida.local-1.0-3.noarch
katello-certs-tools-2.4.0-1.el7.noarch
katello-client-bootstrap-1.2.2-1.el7.noarch
katello-client-repos-3.3.1-1.el7.noarch
katello-common-3.3.1-1.el7.noarch
katello-debug-3.3.1-1.el7.noarch
katello-default-ca-1.0-1.noarch
katello-installer-base-3.3.1.4-1.el7.noarch
katello-repos-3.3.1-1.el7.noarch
katello-selinux-3.0.2-1.el7.noarch
katello-server-ca-1.0-1.noarch
katello-service-3.3.1-1.el7.noarch
katello-utils-3.0.0-2.el7.noarch
pulp-admin-client-2.10.3-1.el7.noarch
pulp-client-1.0-1.noarch
pulp-docker-admin-extensions-2.1.0-1.el7.noarch
pulp-docker-plugins-2.1.0-1.el7.noarch
pulp-katello-1.0.2-1.el7.noarch
pulp-ostree-admin-extensions-1.1.4-1.el7.noarch
pulp-ostree-plugins-1.1.4-1.el7.noarch
pulp-puppet-admin-extensions-2.10.3-1.el7.noarch
pulp-puppet-handlers-2.10.3-1.el7.noarch
pulp-puppet-plugins-2.10.3-1.el7.noarch
pulp-puppet-tools-2.10.3-1.el7.noarch
pulp-rpm-admin-extensions-2.10.3-1.el7.noarch
pulp-rpm-handlers-2.10.3-1.el7.noarch
pulp-rpm-plugins-2.10.3-1.el7.noarch
pulp-rpm-yumplugins-2.10.3-1.el7.noarch
pulp-selinux-2.10.3-1.el7.noarch
pulp-server-2.10.3-1.el7.noarch
python-gofer-qpid-2.7.6-1.el7.noarch
python-isodate-0.5.0-4.pulp.el7.noarch
python-kombu-3.0.33-6.pulp.el7.noarch
python-pulp-agent-lib-2.10.3-1.el7.noarch
python-pulp-bindings-2.10.3-1.el7.noarch
python-pulp-client-lib-2.10.3-1.el7.noarch
python-pulp-common-2.10.3-1.el7.noarch
python-pulp-docker-common-2.1.0-1.el7.noarch
python-pulp-oid_validation-2.10.3-1.el7.noarch
python-pulp-ostree-common-1.1.4-1.el7.noarch
python-pulp-puppet-common-2.10.3-1.el7.noarch
python-pulp-repoauth-2.10.3-1.el7.noarch
python-pulp-rpm-common-2.10.3-1.el7.noarch
python-pulp-streamer-2.10.3-1.el7.noarch
python-qpid-1.35.0-3.el7.noarch
python-qpid-proton-0.17.0-1.el7.x86_64
python-qpid-qmf-1.35.0-3.el7.x86_64
python-urllib3-1.10.2-2.katello.el7.noarch
qpid-cpp-client-1.35.0-3.el7.x86_64
qpid-cpp-client-devel-1.35.0-3.el7.x86_64
qpid-cpp-server-1.35.0-3.el7.x86_64
qpid-cpp-server-linearstore-1.35.0-3.el7.x86_64
qpid-dispatch-router-0.7.0-1.el7.x86_64
qpid-proton-c-0.17.0-1.el7.x86_64
qpid-qmf-1.35.0-3.el7.x86_64
qpid-tools-1.35.0-3.el7.noarch
rubygem-smart_proxy_pulp-1.3.0-1.el7.noarch
tfm-rubygem-ace-rails-ap-4.1.1-1.el7.noarch
tfm-rubygem-activerecord-session_store-0.1.2-2.el7.noarch
tfm-rubygem-addressable-2.3.6-3.el7.noarch
tfm-rubygem-algebrick-0.7.3-4.el7.noarch
tfm-rubygem-ancestry-2.2.1-1.el7.noarch
tfm-rubygem-anemone-0.7.2-14.el7.noarch
tfm-rubygem-angular-rails-templates-0.1.2-5.el7.noarch
tfm-rubygem-apipie-bindings-0.0.18-1.el7.noarch
tfm-rubygem-apipie-params-0.0.5-1.el7.noarch
tfm-rubygem-apipie-rails-0.3.7-1.el7.noarch
tfm-rubygem-audited-4.2.0-1.el7.noarch
tfm-rubygem-audited-activerecord-4.2.0-2.el7.noarch
tfm-rubygem-autoparse-0.3.3-5.el7.noarch
tfm-rubygem-autoprefixer-rails-5.2.1.3-2.el7.noarch
tfm-rubygem-awesome_print-1.7.0-1.el7.noarch
tfm-rubygem-bastion-4.2.2-1.fm1_14.el7.noarch
tfm-rubygem-bootstrap-sass-3.3.7-1.el7.noarch
tfm-rubygem-bundler_ext-0.4.1-1.el7.noarch
tfm-rubygem-clamp-1.0.0-5.el7.noarch
tfm-rubygem-colorize-0.7.7-4.el7.noarch
tfm-rubygem-commonjs-0.2.7-4.el7.noarch
tfm-rubygem-concurrent-ruby-1.0.0-2.fm1_11.el7.noarch
tfm-rubygem-concurrent-ruby-edge-0.2.0-4.fm1_12.el7.noarch
tfm-rubygem-css_parser-1.3.7-1.el7.noarch
tfm-rubygem-daemons-1.2.3-3.el7.noarch
tfm-rubygem-deacon-1.0.0-1.el7.noarch
tfm-rubygem-deep_cloneable-2.2.2-1.el7.noarch
tfm-rubygem-deface-1.0.2-3.el7.noarch
tfm-rubygem-diffy-3.0.1-3.el7.noarch
tfm-rubygem-docker-api-1.28.0-2.el7.noarch
tfm-rubygem-domain_name-0.5.20160310-1.el7.noarch
tfm-rubygem-dynflow-0.8.17-1.fm1_14.el7.noarch
tfm-rubygem-eventmachine-1.0.6-1.el7.x86_64
tfm-rubygem-excon-0.51.0-1.el7.noarch
tfm-rubygem-extlib-0.9.16-4.el7.noarch
tfm-rubygem-facter-2.4.0-3.el7.x86_64
tfm-rubygem-faraday-0.9.1-3.el7.noarch
tfm-rubygem-fast_gettext-1.1.0-1.el7.noarch
tfm-rubygem-fog-1.38.0-1.el7.noarch
tfm-rubygem-fog-aws-0.13.0-1.el7.noarch
tfm-rubygem-fog-core-1.42.0-1.el7.noarch
tfm-rubygem-fog-google-0.1.0-2.el7.noarch
tfm-rubygem-fog-json-1.0.2-4.el7.noarch
tfm-rubygem-fog-libvirt-0.2.0-1.el7.noarch
tfm-rubygem-fog-openstack-0.1.12-1.el7.noarch
tfm-rubygem-fog-rackspace-0.1.1-1.el7.noarch
tfm-rubygem-fog-vsphere-1.4.0-1.el7.noarch
tfm-rubygem-fog-xenserver-0.2.3-1.el7.noarch
tfm-rubygem-fog-xml-0.1.2-4.el7.noarch
tfm-rubygem-font-awesome-sass-4.6.2-1.el7.noarch
tfm-rubygem-foreman-tasks-0.8.6-1.fm1_14.el7.noarch
tfm-rubygem-foreman-tasks-core-0.1.1-1.fm1_14.el7.noarch
tfm-rubygem-foreman_ansible-1.4.4-1.fm1_14.el7.noarch
tfm-rubygem-foreman_ansible_core-1.1.0-1.fm1_14.el7.noarch
tfm-rubygem-foreman_bootdisk-9.0.0-1.fm1_14.el7.noarch
tfm-rubygem-foreman_cockpit-2.0.2-1.fm1_13.el7.noarch
tfm-rubygem-foreman_default_hostgroup-4.0.0-1.fm1_13.el7.noarch
tfm-rubygem-foreman_discovery-8.0.1-1.fm1_14.el7.noarch
tfm-rubygem-foreman_docker-3.0.0-1.fm1_13.el7.noarch
tfm-rubygem-foreman_hooks-0.3.13-1.fm1_14.el7.noarch
tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
tfm-rubygem-foreman_templates-4.0.1-1.fm1_14.el7.noarch
tfm-rubygem-foreman_xen-0.5.1-1.fm1_14.el7.noarch
tfm-rubygem-formatador-0.2.1-9.el7.noarch
tfm-rubygem-friendly_id-5.1.0-3.el7.noarch
tfm-rubygem-gettext-3.1.4-6.el7.noarch
tfm-rubygem-gettext_i18n_rails-1.2.1-3.el7.noarch
tfm-rubygem-gettext_i18n_rails_js-1.0.3-3.el7.noarch
tfm-rubygem-git-1.2.5-7.el7.noarch
tfm-rubygem-google-api-client-0.8.2-5.el7.noarch
tfm-rubygem-gridster-rails-0.5.6.1-1.el7.noarch
tfm-rubygem-hammer_cli-0.8.0-1.el7.noarch
tfm-rubygem-hammer_cli_csv-2.2.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.8.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-5.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.10-2.fm1_12.el7.noarch
tfm-rubygem-hammer_cli_import-0.11.3-1.el7.noarch
tfm-rubygem-hammer_cli_katello-0.3.0-1.el7.noarch
tfm-rubygem-hashie-2.0.5-4.el7.noarch
tfm-rubygem-hashr-0.0.22-7.el7.noarch
tfm-rubygem-highline-1.6.21-5.el7.noarch
tfm-rubygem-hirb-0.7.0-9.el7.noarch
tfm-rubygem-hirb-unicode-steakknife-0.0.7-1.el7.noarch
tfm-rubygem-hooks-0.2.2-7.el7.noarch
tfm-rubygem-http-cookie-1.0.2-1.el7.noarch
tfm-rubygem-ipaddress-0.8.0-9.el7.noarch
tfm-rubygem-jenkins_api_client-1.4.1-3.el7.noarch
tfm-rubygem-jgrep-1.3.3-8.el7.noarch
tfm-rubygem-jquery-turbolinks-2.1.0-5.el7.noarch
tfm-rubygem-jquery-ui-rails-4.1.2-5.el7.noarch
tfm-rubygem-jquery_pwstrength_bootstrap_4-1.2.2-4.el7.noarch
tfm-rubygem-jwt-1.2.0-4.el7.noarch
tfm-rubygem-katello-3.3.1.1-1.el7.noarch
tfm-rubygem-katello_ostree-3.3.1.1-1.el7.noarch
tfm-rubygem-launchy-2.4.3-4.el7.noarch
tfm-rubygem-ldap_fluff-0.4.4-1.el7.noarch
tfm-rubygem-little-plugger-1.1.3-21.el7.noarch
tfm-rubygem-locale-2.0.9-11.el7.noarch
tfm-rubygem-logging-1.8.2-4.el7.noarch
tfm-rubygem-mixlib-shellout-2.2.1-3.el7.noarch
tfm-rubygem-multipart-post-1.2.0-4.el7.noarch
tfm-rubygem-net-ldap-0.15.0-1.el7.noarch
tfm-rubygem-net-scp-1.1.0-6.el7.noarch
tfm-rubygem-net-ssh-3.0.2-2.el7.noarch
tfm-rubygem-netrc-0.7.7-7.el7.noarch
tfm-rubygem-oauth-0.4.7-8.el7.noarch
tfm-rubygem-paint-0.8.7-6.el7.noarch
tfm-rubygem-parse-cron-0.1.4-2.fm1_11.el7.noarch
tfm-rubygem-passenger-4.0.18-9.11.el7.x86_64
tfm-rubygem-passenger-native-4.0.18-9.11.el7.x86_64
tfm-rubygem-passenger-native-libs-4.0.18-9.11.el7.x86_64
tfm-rubygem-patternfly-sass-3.11.0-1.el7.noarch
tfm-rubygem-pg-0.15.1-3.el7.x86_64
tfm-rubygem-po_to_json-1.0.1-2.el7.noarch
tfm-rubygem-powerbar-1.0.17-1.el7.noarch
tfm-rubygem-protected_attributes-1.1.3-3.el7.noarch
tfm-rubygem-qpid_messaging-0.34.1-1.el7.x86_64
tfm-rubygem-quiet_assets-1.0.2-10.el7.noarch
tfm-rubygem-rabl-0.12.0-2.el7.noarch
tfm-rubygem-rack-jsonp-1.3.1-5.el7.noarch
tfm-rubygem-rails-i18n-4.0.9-1.el7.noarch
tfm-rubygem-rails-observers-0.1.2-7.el7.noarch
tfm-rubygem-rbovirt-0.1.2-1.el7.noarch
tfm-rubygem-rbvmomi-1.9.4-1.el7.noarch
tfm-rubygem-responders-2.3.0-1.el7.noarch
tfm-rubygem-rest-client-1.8.0-1.el7.noarch
tfm-rubygem-retriable-1.4.1-4.el7.noarch
tfm-rubygem-roadie-3.1.1-1.el7.noarch
tfm-rubygem-roadie-rails-1.1.1-1.el7.noarch
tfm-rubygem-robotex-1.0.0-19.el7.noarch
tfm-rubygem-ruby-libvirt-0.5.2-4.el7.x86_64
tfm-rubygem-ruby2ruby-2.1.3-4.el7.noarch
tfm-rubygem-ruby_parser-3.6.3-4.el7.noarch
tfm-rubygem-rubyforge-2.0.4-6.el7.noarch
tfm-rubygem-runcible-1.9.1-1.el7.noarch
tfm-rubygem-safemode-1.2.4-2.el7.noarch
tfm-rubygem-scoped_search-3.3.0-1.el7.noarch
tfm-rubygem-secure_headers-3.4.1-1.el7.noarch
tfm-rubygem-sequel-4.20.0-5.el7.noarch
tfm-rubygem-sexp_processor-4.4.4-3.el7.noarch
tfm-rubygem-signet-0.6.0-5.el7.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.1.5-1.fm1_14.el7.noarch
tfm-rubygem-smart_proxy_dynflow_core-doc-0.1.5-1.fm1_14.el7.noarch
tfm-rubygem-spice-html5-rails-0.1.5-5.el7.noarch
tfm-rubygem-sshkey-1.6.0-4.el7.noarch
tfm-rubygem-strong_parameters-0.2.1-13.el7.noarch
tfm-rubygem-syntax-1.0.0-11.el7.noarch
tfm-rubygem-table_print-1.5.1-6.el7.noarch
tfm-rubygem-terminal-table-1.5.2-2.el7.noarch
tfm-rubygem-text-1.3.0-4.el7.noarch
tfm-rubygem-trollop-2.1.2-1.el7.noarch
tfm-rubygem-unf-0.1.3-5.el7.noarch
tfm-rubygem-unf_ext-0.0.6-6.el7.x86_64
tfm-rubygem-unicode-display_width-1.0.5-1.el7.noarch
tfm-rubygem-useragent-0.16.8-1.el7.noarch
tfm-rubygem-validates_lengths_from_database-0.5.0-3.el7.noarch
tfm-rubygem-webpack-rails-0.9.8-1.el7.noarch
tfm-rubygem-wicked-1.1.0-4.el7.noarch
tfm-rubygem-will_paginate-3.1.5-1.el7.noarch
tfm-rubygem-wirb-1.0.3-3.el7.noarch
tfm-rubygem-x-editable-rails-1.5.5-1.el7.noarch
tfm-runtime-3.2-5.el7.x86_64
tfm-runtime-assets-3.2-5.el7.x86_64
Updated by Justin Sherrill over 7 years ago
- Subject changed from Cannot Create New Lifecycle Environment to Cannot Create New Lifecycle Environment when Clicking too fast
- Assignee set to Walden Raines
I've seen this as well, I think it only occurs when you click on 'create lifeycle environment' too quickly before all the resources are loaded for the page. If you wait an extra ~5-10 seconds, it should work fine.
Updated by Richard Lowery over 7 years ago
I tried that after I found another report, but... I waited a full minute, and still got the same response.
Updated by Walden Raines over 7 years ago
- Subject changed from Cannot Create New Lifecycle Environment when Clicking too fast to Cannot Create New Lifecycle Environment
Justin Sherrill wrote:
I've seen this as well, I think it only occurs when you click on 'create lifeycle environment' too quickly before all the resources are loaded for the page. If you wait an extra ~5-10 seconds, it should work fine.
This doesn't appear to be related to clicking too fast. In the JSON above all IDs are provided. If this was related to resources not being loaded I would expect one of those to be null. If I cause the same condition being described above by visiting lifecycle_environments//new and I get this:
param is missing or the value is empty: prior_id
Updated by Walden Raines over 7 years ago
- Status changed from New to Need more information
- Assignee deleted (
Walden Raines)
We need more information to track this down.
What other environments are present on your system?
Were there any other steps to reproduce to cause this to happen?
Updated by Justin Sherrill over 7 years ago
- Assignee set to Walden Raines
Walden I think you are correct,
Richard, can you try going to Administer > Organizations > click on the organization, and click 'submit'. Do you see any errors?
Also, can you try running:
- foreman-rake console
env = Katello::KTEnvironment.find(1)
env.valid?
env.errors
and provide the output.
thanks
Updated by Richard Lowery over 7 years ago
No errors in the UI or the logfile going Administrater->Organizations->FIRRE
<submit>
There are a number of different environments:
Library
->Development
->SysTest
->UAT
->Production
->OpsDev
->OpsTest
->OpsProd
->Lab01
The new Environment would have been a child of Library.
[root@firre-is-vsrv29 ~]# foreman-rake console
WARNING: v8314 is not enabled. You need to enable v8314 scl to be able to run v8 runtime.
e.g. You can run rails like `scl enable ror40 v8314 'rails s'`
/usr/share/foreman/lib/tasks/console.rake:6: warning: already initialized constant ARGV
For some operations a user must be set, try User.current = User.first
Loading production environment (Rails 4.2.5.1)
irb(main):001:0> env=Katello::KTEnvironment.find(1)-----------+-------------+---------+-----------------+-------------------------+-------------------------+---------+
| id | name | description | library | organization_id | created_at | updated_at | label |-----------+-------------+---------+-----------------+-------------------------+-------------------------+---------+
| 1 | Library | | true | 1 | 2015-12-17 21:31:19 UTC | 2015-12-17 21:31:19 UTC | Library |-----------+-------------+---------+-----------------+-------------------------+-------------------------+---------+
1 row in set
irb(main):002:0> env.valid?
=> false
irb(main):003:0> env.errors
=> #<ActiveModel::Errors:0x00000005ec09a0 @base=#<Katello::KTEnvironment id: 1, name: "Library", description: nil, library: true, organization_id: 1, created_at: "2015-12-17 21:31:19", updated_at: "2015-12-17 21:31:19", label: "Library">, @messages={:prior=>["environment can only have one child"]}>
irb(main):004:0>
Updated by Richard Lowery over 7 years ago
can't test anymore, wiping it out, re-installing, and re-creating everything.
Updated by Richard Lowery over 7 years ago
Well, wipe and recreate resulted in problem not present. I'll put it down to something with an upgrade somewhere along the line. It was a 2 year old installation tgat has been through a few upgrades. Recommend status change closed.
Updated by Richard Lowery over 7 years ago
- Status changed from Need more information to Resolved
Clean install doesn't have issue.