Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Postinstall can no longer be run twice (Traffic Vault load_schema error) #6712

@davidc0le

Description

@davidc0le

This Bug Report affects these Traffic Control components:

  • Traffic Ops

Current behavior:

This issue is similar to #4984 . When running postinstall twice when using the Postgres backend for Traffic Vault, the load_schema operation for Traffic Vault causes an error. The command db/admin --trafficvault -env=production load_schema is executed by the postinstall. The error is as follows:

ALTER TABLE ONLY dnssec
    ADD CONSTRAINT dnssec_pkey PRIMARY KEY (cdn);
ERROR:  multiple primary keys for table "dnssec" are not allowed
Can't create database tables

Expected behavior:

As per #4984, running postinstall twice should be possible without errors.

Steps to reproduce:

Run Postinstall with postgres being used for the Traffic Vault backend.
Run Postinstall again with the same input

Metadata

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic OpsTraffic Vaultrelated to Traffic Vaultbugsomething isn't working as intendeddatabaserelating to setup/installation/structure of the Traffic Ops database

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions