Comment 3 for bug 1750705

Revision history for this message
James Page (james-page) wrote : Re: glance CRITI Unhandled error DBError Duplicate column name

I think you might find there is a previous error related to the creation of triggers in the db:

  File "/usr/lib/python2.7/dist-packages/glance/db/sqlalchemy/alembic_migrations/versions/ocata_expand01_add_visibility.py", line 133, in _add_triggers

DBError: (pymysql.err.InternalError) (1419, u'You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)') [SQL: u"\nCREATE TRIGGER insert_visibility BEFORE INSERT ON images\nFOR EACH ROW\nBEGIN\n -- NOTE(abashmak):\n -- The following IF/ELSE block implements a priority decision tree.\n -- Strict order MUST be followed to correctly cover all the edge cases.\n\n -- Edge case: neither is_public nor visibility specified\n -- (or both specified as NULL):\n IF NEW.is_public <=> NULL AND NEW.visibility <=> NULL THEN\n SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Invalid visibility value';\n -- Edge case: both is_public and visibility specified:\n ELSEIF NOT(NEW.is_public <=> NULL OR NEW.visibility <=> NULL) THEN\n SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Invalid visibility value';\n -- Inserting with is_public, set visibility accordingly:\n ELSEIF NOT NEW.is_public <=> NULL THEN\n IF NEW.is_public = 1 THEN\n SET NEW.visibility = 'public';\n ELSE\n SET NEW.visibility = 'shared';\n END IF;\n -- Inserting with visibility, set is_public accordingly:\n ELSEIF NOT NEW.visibility <=> NULL THEN\n IF NEW.visibility = 'public' THEN\n SET NEW.is_public = 1;\n ELSE\n SET NEW.is_public = 0;\n END IF;\n -- Edge case: either one of: is_public or visibility,\n -- is explicitly set to NULL:\n ELSE\n SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Invalid visibility value';\n END IF;\nEND;\n"]