← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1900371] [NEW] "Data too long for column internal_access_path" for migrated instance with vmware driver

 

Public bug reported:

In vmware environment, if I migration an instance with "--blcok-
migration", VM console failed to work after migration.

The nova-mksproxy log below is found.

(1406, u"Data too long for column \'internal_access_path\' at row 1")
[SQL: u\'INSERT INTO console_auth_tokens (created_at, updated_at,
token_hash, console_type, host, port, internal_access_path,
instance_uuid, expires, access_url_base) VALUES (%(created_at)s,
%(updated_at)s, %(token_hash)s, %(console_type)s, %(host)s, %(port)s,
%(internal_access_path)s, %(instance_uuid)s, %(expires)s,
%(access_url_base)s)\'] [parameters: {\'instance_uuid\': u\'8d3773ef-
f9f6-42fc-8e22-28de6d208da9\', \'internal_access_path\': u\'{"ticket":
"52fe2e83-3ff8-7c9f-00e7-fcb3a3815945", "thumbprint":
"41d99c49b0ba5979ac0f7df4751215dfb4dbf250", "cfgFile":
"/vmfs/volumes/5f5efac4-cd23 ... (11 characters truncated) ...
cfdfee4f7c4/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
8e22-28de6d208da9)/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
8e22-28de6d208da9).vmx"}\', \'created_at\': datetime.datetime(2020, 9,
17, 11, 34, 25, 759063), \'expires\': 1600343065, \'updated_at\': None,
\'access_url_base\': u\'https://172.22.158.3:6090/vnc_auto.html\',
\'port\': 902, \'host\': u\'ctaoym3a-phpv008.cta.kddi.local\',
\'token_hash\':
\'8467819767db2027878addf1e2421b80eb4a3ba84d40d6072cf1924f229e57a6\',
\'console_type\': u\'novnc\'

The root caus is that the vm path is changed due to "block migration".

Originally the vm path is /vmfs/volumes/<datastore-uuid>/<vm-uuid>/<vm-
uuid>.vmx. After block migration, the vm path is changed to
/vmfs/volumes/<datastore-uuid>/<vm-name> (<vm-uuid>)/<vm-name> (<vm-
uuid>).vmx

The path length is increased.

For the vm console, a token is generated and stored temporarily in table
console_auth_tokens. The value of column 'internal_access_path' is like
below in vmware driver.

'internal_access_path\': u\'{"ticket": "52fe2e83-3ff8-7c9f-
00e7-fcb3a3815945", "thumbprint":
"41d99c49b0ba5979ac0f7df4751215dfb4dbf250", "cfgFile":
"/vmfs/volumes/5f5efac4-cd23 ... (11 characters truncated) ...
cfdfee4f7c4/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
8e22-28de6d208da9)/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
8e22-28de6d208da9).vmx"}\'

The cfgFile is the vm path returned in a vsphere API AcquireTicket.

Since the cfgFile becomes longer so the internal_access_path exceeds 255
bytes. So we see the error.

As I cannot change vsphere behavior, I would like change the type of
internal_access_path for VARCHAR(255) to VARCHAR(400).

Another question for this bug is that there is no xxx_placeholder.py
file  nova/db/sqlalchemy/migrate_repo/versions for train and
403_placeholder.py is "Add reserved schema migrations for Ussuri", how
can I resolve this issue in Train branch?

** Affects: nova
     Importance: Undecided
     Assignee: Yingji Sun (yingjisun)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Yingji Sun (yingjisun)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1900371

Title:
  "Data too long for column internal_access_path" for migrated instance
  with vmware driver

Status in OpenStack Compute (nova):
  New

Bug description:
  In vmware environment, if I migration an instance with "--blcok-
  migration", VM console failed to work after migration.

  The nova-mksproxy log below is found.

  (1406, u"Data too long for column \'internal_access_path\' at row 1")
  [SQL: u\'INSERT INTO console_auth_tokens (created_at, updated_at,
  token_hash, console_type, host, port, internal_access_path,
  instance_uuid, expires, access_url_base) VALUES (%(created_at)s,
  %(updated_at)s, %(token_hash)s, %(console_type)s, %(host)s, %(port)s,
  %(internal_access_path)s, %(instance_uuid)s, %(expires)s,
  %(access_url_base)s)\'] [parameters: {\'instance_uuid\': u\'8d3773ef-
  f9f6-42fc-8e22-28de6d208da9\', \'internal_access_path\': u\'{"ticket":
  "52fe2e83-3ff8-7c9f-00e7-fcb3a3815945", "thumbprint":
  "41d99c49b0ba5979ac0f7df4751215dfb4dbf250", "cfgFile":
  "/vmfs/volumes/5f5efac4-cd23 ... (11 characters truncated) ...
  cfdfee4f7c4/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
  8e22-28de6d208da9)/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
  8e22-28de6d208da9).vmx"}\', \'created_at\': datetime.datetime(2020, 9,
  17, 11, 34, 25, 759063), \'expires\': 1600343065, \'updated_at\':
  None, \'access_url_base\':
  u\'https://172.22.158.3:6090/vnc_auto.html\', \'port\': 902, \'host\':
  u\'ctaoym3a-phpv008.cta.kddi.local\', \'token_hash\':
  \'8467819767db2027878addf1e2421b80eb4a3ba84d40d6072cf1924f229e57a6\',
  \'console_type\': u\'novnc\'

  The root caus is that the vm path is changed due to "block migration".

  Originally the vm path is /vmfs/volumes/<datastore-uuid>/<vm-uuid
  >/<vm-uuid>.vmx. After block migration, the vm path is changed to
  /vmfs/volumes/<datastore-uuid>/<vm-name> (<vm-uuid>)/<vm-name> (<vm-
  uuid>).vmx

  The path length is increased.

  For the vm console, a token is generated and stored temporarily in
  table console_auth_tokens. The value of column 'internal_access_path'
  is like below in vmware driver.

  'internal_access_path\': u\'{"ticket": "52fe2e83-3ff8-7c9f-
  00e7-fcb3a3815945", "thumbprint":
  "41d99c49b0ba5979ac0f7df4751215dfb4dbf250", "cfgFile":
  "/vmfs/volumes/5f5efac4-cd23 ... (11 characters truncated) ...
  cfdfee4f7c4/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
  8e22-28de6d208da9)/isao-test-after-vacuumd-a1 (8d3773ef-f9f6-42fc-
  8e22-28de6d208da9).vmx"}\'

  The cfgFile is the vm path returned in a vsphere API AcquireTicket.

  Since the cfgFile becomes longer so the internal_access_path exceeds
  255 bytes. So we see the error.

  As I cannot change vsphere behavior, I would like change the type of
  internal_access_path for VARCHAR(255) to VARCHAR(400).

  Another question for this bug is that there is no xxx_placeholder.py
  file  nova/db/sqlalchemy/migrate_repo/versions for train and
  403_placeholder.py is "Add reserved schema migrations for Ussuri", how
  can I resolve this issue in Train branch?

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