Public bug reported:

I am trying to upgrade the platform from queens to rocky . To meet
production needs, I cannot upgrade the platform in place. So I need to
copy the queens version data to the rocky version environment before
upgrading. After I import the queens version database to the rocky
version, execute the following command:

"neutron-db-manage \
  --config-file /etc/neutron/neutron.conf \
  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
  upgrade head"
Then I got an error:

oslo_db.exception.DBError: (pymysql.err.InternalError) (1005, u'Can\'t
create table `neutron`.`portforwardings` (errno: 150 "Foreign key
constraint is incorrectly formed")') [SQL: u'\nCREATE TABLE
portforwardings (\n\tid VARCHAR(36) NOT NULL, \n\tfloatingip_id
VARCHAR(36) NOT NULL, \n\texternal_port INTEGER NOT NULL,
\n\tinternal_neutron_port_id VARCHAR(36) NOT NULL, \n\tprotocol
VARCHAR(40) NOT NULL, \n\tsocket VARCHAR(36) NOT NULL, \n\tPRIMARY KEY
(id), \n\tFOREIGN KEY(floatingip_id) REFERENCES floatingips (id) ON
DELETE CASCADE, \n\tFOREIGN KEY(internal_neutron_port_id) REFERENCES
ports (id) ON DELETE CASCADE, \n\tCONSTRAINT
uniq_port_forwardings0floatingip_id0external_port UNIQUE (floatingip_id,
external_port), \n\tCONSTRAINT
uniq_port_forwardings0internal_neutron_port_id0socket UNIQUE
(internal_neutron_port_id, socket)\n)ENGINE=InnoDB\n\n'] (Background on
this error at: http://sqlalche.me/e/2j85)

Then I check the two tables: floatingips and ports, found that there was
"DEFAULT CHARSET=utf8"of the two, so I entered the database to manually
create table portforwardings and succeeded.

If there is a bug?

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1881685

Title:
  Inconsistent coding while upgrading

Status in neutron:
  New

Bug description:
  I am trying to upgrade the platform from queens to rocky . To meet
  production needs, I cannot upgrade the platform in place. So I need to
  copy the queens version data to the rocky version environment before
  upgrading. After I import the queens version database to the rocky
  version, execute the following command:

  "neutron-db-manage \
    --config-file /etc/neutron/neutron.conf \
    --config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
    upgrade head"
  Then I got an error:

  oslo_db.exception.DBError: (pymysql.err.InternalError) (1005, u'Can\'t
  create table `neutron`.`portforwardings` (errno: 150 "Foreign key
  constraint is incorrectly formed")') [SQL: u'\nCREATE TABLE
  portforwardings (\n\tid VARCHAR(36) NOT NULL, \n\tfloatingip_id
  VARCHAR(36) NOT NULL, \n\texternal_port INTEGER NOT NULL,
  \n\tinternal_neutron_port_id VARCHAR(36) NOT NULL, \n\tprotocol
  VARCHAR(40) NOT NULL, \n\tsocket VARCHAR(36) NOT NULL, \n\tPRIMARY KEY
  (id), \n\tFOREIGN KEY(floatingip_id) REFERENCES floatingips (id) ON
  DELETE CASCADE, \n\tFOREIGN KEY(internal_neutron_port_id) REFERENCES
  ports (id) ON DELETE CASCADE, \n\tCONSTRAINT
  uniq_port_forwardings0floatingip_id0external_port UNIQUE
  (floatingip_id, external_port), \n\tCONSTRAINT
  uniq_port_forwardings0internal_neutron_port_id0socket UNIQUE
  (internal_neutron_port_id, socket)\n)ENGINE=InnoDB\n\n'] (Background
  on this error at: http://sqlalche.me/e/2j85)

  Then I check the two tables: floatingips and ports, found that there
  was "DEFAULT CHARSET=utf8"of the two, so I entered the database to
  manually create table portforwardings and succeeded.

  If there is a bug?

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1881685/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to