- From: Steven Danna <
>
- To: "
" <
>
- Subject: [chef] Re: Re: Re: Failed uploading transformed data to the Chef 12 server
- Date: Wed, 3 Dec 2014 20:49:11 +0000
Hi,
>
- removed packages chef* and directories /opt/chef* and /opt/opscode*
The databases are in /var/opt/opscode, so they were likely left
behind. If you do chef-server-ctl cleanse, and then remove the
packages, that should put you in a completely clean state. Then the
rest of your process should work.
>
What I would like to ask you guys:
>
- What is the best way to do export/import? Is using "knife backup"?
>
- The "knife backup" will work on Chef 12?
For going from chef11 to chef12 knife backup should work. Once you
are on Chef 12, you'll want to use knife-ec-backup or do disk-level
backups.
>
- What is the best way to do rollback on my case? 'Cause either Chef 11 or
>
12 was not working, hehehehe
I would use the same procedure you had above but start with a full
`chef-server-ctl cleanse` on the new server.
Cheers,
Steven
On Wed, Dec 3, 2014 at 8:48 PM, Steven Danna
<
>
wrote:
>
On Wed, Dec 3, 2014 at 7:57 PM, Tiago Cruz
>
<
>
>
wrote:
>
>
> - removed packages chef* and directories /opt/chef* and /opt/opscode*
>
>
The databases are in /var/opt/opscode, so they were likely left
>
behind. If you do chef-server-ctl cleanse, and then remove the
>
packages, that should put you in a completely clean state. Then the
>
rest of your process should work.
>
>
> What I would like to ask you guys:
>
> - What is the best way to do export/import? Is using "knife backup"?
>
>
> - The "knife backup" will work on Chef 12?
>
>
For going from chef11 to chef12 knife backup should work. Once you
>
are on Chef 12, you'll want to use knife-ec-backup or do disk-level
>
backups.
>
>
> - What is the best way to do rollback on my case? 'Cause either Chef 11 or
>
> 12 was not working, hehehehe
>
>
I would use the same procedure you had above but start with a full
>
`chef-server-ctl cleanse` on the new server.
>
>
Cheers,
>
>
Steven
>
>
>
> Thanks a lot!
>
>
>
>
>
> On Wed, Dec 3, 2014 at 5:02 PM, Steven Danna
>
> <
>
>
> wrote:
>
>>
>
>> Hi,
>
>>
>
>> Any chance you are upgrading from an RC? The error in question:
>
>>
>
>> > ERROR: Sequel::ForeignKeyConstraintViolation: PG::ForeignKeyViolation:
>
>> > ERROR: update or delete on table "users" violates foreign key
>
>> > constraint
>
>> > "org_user_associations_user_id_fkey" on table "org_user_associations"
>
>> > DETAIL: Key (id)=(0000000000005168ebaf554ff5aeb9e1) is still referenced
>
>> > from table "org_user_associations".
>
>>
>
>> appears to be a problem when we import the sql backup of your user.
>
>> When we do that, we also import the old id of that user. This is
>
>> mostly an artifact of the fact that the underlying tool
>
>> (knife-ec-backup) was originally created for Enterprise Chef to
>
>> Enterprise Chef migrations where the user id needs to be preserved for
>
>> various reasons. The id update shouldn't really cause any problems in
>
>> an empty Chef Server 12 database. However, from the error message
>
>> here, it looks like your user tiago_cruz is already associated with an
>
>> organization in the new installation, and updating the id of the user
>
>> is causing a foreign key constraint violation. What is odd is that at
>
>> this point in the upgrade, I don't think your user should be
>
>> associated with any orgs yet.
>
>>
>
>> Mind spelling out the steps you took to get here?
>
>>
>
>> Cheers,
>
>>
>
>> Steven
>
>>
>
>> On Wed, Dec 3, 2014 at 4:32 PM, Tiago Cruz
>
>> <
>
>
>> wrote:
>
>> > Hello Guys,
>
>> >
>
>> > Using this packages:
>
>> >
>
>> >
>
>> > ~]# rpm -qa | grep chef
>
>> > chef-server-11.1.6-1.el6.x86_64
>
>> > chef-11.16.4-1.el6.x86_64
>
>> > chef-server-core-12.0.0-1.el6.x86_64
>
>> >
>
>> > After run: '# chef-server-ctl upgrade' on Centos 6.3 box:
>
>> >
>
>> > ...
>
>> > Recipe: <Dynamically Defined Resource>
>
>> > * service[nginx] action restart
>
>> > - restart service service[nginx]
>
>> >
>
>> >
>
>> > Running handlers:
>
>> > Running handlers complete
>
>> >
>
>> > Chef Client finished, 266/420 resources updated in 72.236075247 seconds
>
>> > opscode Reconfigured!
>
>> > Ensuring Chef 12 server components are started
>
>> > ok: run: bookshelf: (pid 8213) 4s
>
>> > ok: run: nginx: (pid 8369) 2s
>
>> > ok: run: oc_bifrost: (pid 8099) 7s
>
>> > ok: run: oc_id: (pid 7378) 38s
>
>> > ok: run: opscode-chef-mover: (pid 7967) 17s
>
>> > ok: run: opscode-erchef: (pid 8273) 4s
>
>> > ok: run: opscode-expander: (pid 7491) 36s
>
>> > ok: run: opscode-expander-reindexer: (pid 7608) 30s
>
>> > ok: run: opscode-solr4: (pid 8176) 5s
>
>> > ok: run: postgresql: (pid 8068) 7s
>
>> > ok: run: rabbitmq: (pid 6570) 66s
>
>> > ok: run: redis_lb: (pid 8021) 14s
>
>> > Chef 12 server started
>
>> > Writing knife-ec-backup config to /tmp/knife-ec-backup-config.rb
>
>> > Uploading transformed open source Chef 11 server data to Chef 12 server
>
>> > WARNING: WebUI not specified. Using /etc/opscode/webui_priv.pem
>
>> > Detected Enterprise Chef Server version: 12.0.0
>
>> > Restoring users ...
>
>> > Updating key for admin
>
>> > Updating key for tiago_cruz
>
>> > ERROR: Sequel::ForeignKeyConstraintViolation: PG::ForeignKeyViolation:
>
>> > ERROR: update or delete on table "users" violates foreign key
>
>> > constraint
>
>> > "org_user_associations_user_id_fkey" on table "org_user_associations"
>
>> > DETAIL: Key (id)=(0000000000005168ebaf554ff5aeb9e1) is still referenced
>
>> > from table "org_user_associations".
>
>> > Failed uploading transformed data to the Chef 12 server
>
>> >
>
>> >
>
>> > I'm not sure how to proceed :)
>
>> >
>
>> > Thanks a lot!
>
>> >
>
>> > --
>
>> > -- Tiago Cruz
>
>> >
>
>
>
>
>
>
>
>
>
> --
>
> -- Tiago Cruz
>
>
Archive powered by MHonArc 2.6.16.