Ask Your Question
0

sqlalchemy.exc.IntegrityError: (IntegrityError) (1062,

asked 2014-02-06 06:36:36 -0500

Srijit Nair gravatar image

Hi, getting the following error while installing devstack :

2014-02-06 16:30:51 sqlalchemy.exc.IntegrityError: (IntegrityError) (1062, "Duplicate entry 'Metadata agent-srijit-vm' for key 'uniq_agents0agent_type0host'") 'ALTER TABLE agents ADD CONSTRAINT uniq_agents0agent_type0host UNIQUE (agent_type, host)' ()

you help is appreciated. Regards, Srijit

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-06 08:47:50 -0500

Srijit Nair gravatar image

Hi, I have resolved this issue with the following steps :

 mysql -u root -p<password>
mysql> use ovs_neutron;
mysql> select * from agents;

get the id of the row that has the user-agent as mentioned in the error logs : agent-srijit-vm in my case. now delete the row corresponding to the id :

delete from agents where id='4b4d48c4-74e7-4f71-9ef0-97c4a010a9d1';

verify again :

mysql> select * from agents;

now run stack.sh again. Should solve the unique key issue.

2014-02-06 19:33:46 + [[ ! -d /opt/stack/status/stack ]]
2014-02-06 19:33:46 ++ ls '/opt/stack/status/stack/*.failure'
2014-02-06 19:33:46 + failures=
2014-02-06 19:33:46 + '[' -n '' ']'
2014-02-06 19:33:46 + set +o xtrace
2014-02-06 19:33:46 stack.sh completed in 2801 seconds.

Regards, Srijit

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-06 06:36:36 -0500

Seen: 878 times

Last updated: Feb 06 '14