[asterisk-bugs] [JIRA] (ASTERISK-27254) alembic: prune_on_boot fix erroneous

Friendly Automation (JIRA) noreply at issues.asterisk.org
Wed Sep 6 10:23:08 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238522#comment-238522 ] 

Friendly Automation commented on ASTERISK-27254:
------------------------------------------------

Change 6425 merged by Jenkins2:
alembic: fix erroneous commit for add_prune_on_boot

[https://gerrit.asterisk.org/6425|https://gerrit.asterisk.org/6425]

> alembic: prune_on_boot fix erroneous
> ------------------------------------
>
>                 Key: ASTERISK-27254
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27254
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>    Affects Versions: 14.6.0
>         Environment: Debian 9 (Stretch), alembic 0.8.8 from Debian package, sqlalchemy 1.0.15 from Debian package, MySQL server 5.7
>            Reporter: Florian Floimair
>            Severity: Minor
>
> Commit id 86b74dc0ee20c1eb44c13622579d5ec122960ad9 introducing the "prune_on_boot" option is incomplete (missing the ENUM include) and throws an error when applied.
> The error output is as follows:
> {noformat}
> INFO  [alembic.runtime.migration] Context impl MySQLImpl.
> INFO  [alembic.runtime.migration] Generating static SQL
> INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
> INFO  [alembic.runtime.migration] Running upgrade  -> 4da0c5f79a9c, Create tables
> INFO  [alembic.runtime.migration] Running upgrade 4da0c5f79a9c -> 43956d550a44, Add tables for pjsip
> INFO  [alembic.runtime.migration] Running upgrade 43956d550a44 -> 581a4264e537, adding extensions
> INFO  [alembic.runtime.migration] Running upgrade 581a4264e537 -> 2fc7930b41b3, Add/Update tables for pjsip
> INFO  [alembic.runtime.migration] Running upgrade 2fc7930b41b3 -> 21e526ad3040, add pjsip debug option
> INFO  [alembic.runtime.migration] Running upgrade 21e526ad3040 -> 28887f25a46f, Create queue tables
> INFO  [alembic.runtime.migration] Running upgrade 28887f25a46f -> 4c573e7135bd, Fix tos and cos field types
> INFO  [alembic.runtime.migration] Running upgrade 4c573e7135bd -> 3855ee4e5f85, add_missing_pjsip_options
> INFO  [alembic.runtime.migration] Running upgrade 3855ee4e5f85 -> e96a0b8071c, increase pjsip columns size
> INFO  [alembic.runtime.migration] Running upgrade e96a0b8071c -> c6d929b23a8, create pjsip subscription persistence table
> INFO  [alembic.runtime.migration] Running upgrade c6d929b23a8 -> 51f8cb66540e, add further dtls options
> INFO  [alembic.runtime.migration] Running upgrade 51f8cb66540e -> 1d50859ed02e, create accountcode
> INFO  [alembic.runtime.migration] Running upgrade 1d50859ed02e -> 1758e8bbf6b, increase useragent column size
> INFO  [alembic.runtime.migration] Running upgrade 1758e8bbf6b -> 5139253c0423, make q member uniqueid autoinc
> INFO  [alembic.runtime.migration] Running upgrade 5139253c0423 -> d39508cb8d8, Create queue_rules
> INFO  [alembic.runtime.migration] Running upgrade d39508cb8d8 -> 5950038a6ead, Fix pjsip transports verify column
> INFO  [alembic.runtime.migration] Running upgrade 5950038a6ead -> 10aedae86a32, Add Outgoing enum value to sippeers directmedia
> INFO  [alembic.runtime.migration] Running upgrade 10aedae86a32 -> 371a3bf4143e, add user_eq_phone option to pjsip
> INFO  [alembic.runtime.migration] Running upgrade 371a3bf4143e -> 15b1430ad6f1, add moh passthrough option to pjsip
> INFO  [alembic.runtime.migration] Running upgrade 15b1430ad6f1 -> 945b1098bdd, add media encryption optimistic to pjsip
> INFO  [alembic.runtime.migration] Running upgrade 945b1098bdd -> 45e3f47c6c44, add pjsip endpoint_identifier_order
> INFO  [alembic.runtime.migration] Running upgrade 45e3f47c6c44 -> 23530d604b96, add rpid_immediate
> INFO  [alembic.runtime.migration] Running upgrade 23530d604b96 -> 31cd4f4891ec, Add auto DTMF mode
> INFO  [alembic.runtime.migration] Running upgrade 31cd4f4891ec -> 461d7d691209, add pjsip qualify_timeout
> INFO  [alembic.runtime.migration] Running upgrade 461d7d691209 -> a541e0b5e89, add pjsip max_initial_qualify_time
> INFO  [alembic.runtime.migration] Running upgrade a541e0b5e89 -> 28b8e71e541f, add g726_non_standard
> INFO  [alembic.runtime.migration] Running upgrade 28b8e71e541f -> 498357a710ae, Add RTP keepalive
> INFO  [alembic.runtime.migration] Running upgrade 498357a710ae -> 26f10cadc157, add pjsip timeout options
> INFO  [alembic.runtime.migration] Running upgrade 26f10cadc157 -> 154177371065, add default_from_user
> INFO  [alembic.runtime.migration] Running upgrade 154177371065 -> 28ce1e718f05, add fatal_response_interval
> INFO  [alembic.runtime.migration] Running upgrade 28ce1e718f05 -> 339a3bdf53fc, expand accountcode to 80
> INFO  [alembic.runtime.migration] Running upgrade 339a3bdf53fc -> 189a235b3fd7, add_keep_alive_interval
> INFO  [alembic.runtime.migration] Running upgrade 189a235b3fd7 -> 2d078ec071b7, increaes_contact_column_size
> INFO  [alembic.runtime.migration] Running upgrade 2d078ec071b7 -> 26d7f3bf0fa5, add bind_rtp_to_media_address to pjsip
> INFO  [alembic.runtime.migration] Running upgrade 26d7f3bf0fa5 -> 136885b81223, add regcontext to pjsip
> INFO  [alembic.runtime.migration] Running upgrade 136885b81223 -> 423f34ad36e2, fix pjsip qualify timeout
> INFO  [alembic.runtime.migration] Running upgrade 423f34ad36e2 -> dbc44d5a908, Add missing columns to system and registration
> INFO  [alembic.runtime.migration] Running upgrade dbc44d5a908 -> 3bcc0b5bc2c9, Add allow_reload to ps_transports
> INFO  [alembic.runtime.migration] Running upgrade 3bcc0b5bc2c9 -> 5813202e92be, Add contact_expiration_check_interval to ps_globals
> INFO  [alembic.runtime.migration] Running upgrade 5813202e92be -> 1c688d9a003c, pjsip voicemail extension
> INFO  [alembic.runtime.migration] Running upgrade 1c688d9a003c -> 8d478ab86e29, pjsip_add_disable_multi_domain
> INFO  [alembic.runtime.migration] Running upgrade 8d478ab86e29 -> 65eb22eb195, Add unidentified request options to global
> INFO  [alembic.runtime.migration] Running upgrade 65eb22eb195 -> 81b01a191a46, pjsip: add contact reg_server
> INFO  [alembic.runtime.migration] Running upgrade 81b01a191a46 -> 6be31516058d, ps_contacts add authenticate_qualify
> INFO  [alembic.runtime.migration] Running upgrade 6be31516058d -> d7e3c73eb2bf, Add PJSIP Endpoint IP Access Control options
> INFO  [alembic.runtime.migration] Running upgrade d7e3c73eb2bf -> a845e4d8ade8, res_pjsip: add contact via_addr and callid
> INFO  [alembic.runtime.migration] Running upgrade a845e4d8ade8 -> ef7efc2d3964, ps_contacts add endpoint and modify expiration_time to bigint
> INFO  [alembic.runtime.migration] Running upgrade ef7efc2d3964 -> 9deac0ae4717, pjsip_add_subscribe_context
> INFO  [alembic.runtime.migration] Running upgrade 9deac0ae4717 -> 4a6c67fa9b7a, add fax_detect_timeout option
> INFO  [alembic.runtime.migration] Running upgrade 4a6c67fa9b7a -> c7a44a5a0851, pjsip: add global MWI options
> INFO  [alembic.runtime.migration] Running upgrade c7a44a5a0851 -> 3772f8f828da, update_identify_by
> INFO  [alembic.runtime.migration] Running upgrade 3772f8f828da -> 4e2493ef32e6, Add contact_user to endpoint
> INFO  [alembic.runtime.migration] Running upgrade 4e2493ef32e6 -> a6ef36f1309, ps_globals add ignore_uri_user_options
> INFO  [alembic.runtime.migration] Running upgrade a6ef36f1309 -> 4468b4a91372, add pjsip asymmetric rtp codec
> INFO  [alembic.runtime.migration] Running upgrade 4468b4a91372 -> 28ab27a7826d, add srv_lookups to identify
> INFO  [alembic.runtime.migration] Running upgrade 28ab27a7826d -> 465e70e8c337, Add match_header attribute to identify
> INFO  [alembic.runtime.migration] Running upgrade 465e70e8c337 -> 15db7b91a97a, empty message
> INFO  [alembic.runtime.migration] Running upgrade 15db7b91a97a -> f638dbe2eb23, symmetric_transport
> INFO  [alembic.runtime.migration] Running upgrade f638dbe2eb23 -> 8fce4c573e15, add pjsip allow_overlap
> INFO  [alembic.runtime.migration] Running upgrade 8fce4c573e15 -> 2da192dbbc65, add publish tables
> INFO  [alembic.runtime.migration] Running upgrade 2da192dbbc65 -> 1d0e332c32af, create rls table
> INFO  [alembic.runtime.migration] Running upgrade 1d0e332c32af -> 86bb1efa278d, add ps_endpoints.refer_blind_progress
> INFO  [alembic.runtime.migration] Running upgrade 86bb1efa278d -> d7983954dd96, add ps_endpoints.notify_early_inuse_ringing
> INFO  [alembic.runtime.migration] Running upgrade d7983954dd96 -> 164abbd708c, Add auto_info to endpoint dtmf_mode
> INFO  [alembic.runtime.migration] Running upgrade 164abbd708c -> f3d1c5d38b56, add_prune_on_boot
> Traceback (most recent call last):
>   File "/usr/bin/alembic", line 11, in <module>
>     load_entry_point('alembic==0.8.8.dev0', 'console_scripts', 'alembic')()
>   File "/usr/lib/python2.7/dist-packages/alembic/config.py", line 479, in main
>     CommandLine(prog=prog).main(argv=argv)
>   File "/usr/lib/python2.7/dist-packages/alembic/config.py", line 473, in main
>     self.run_cmd(cfg, options)
>   File "/usr/lib/python2.7/dist-packages/alembic/config.py", line 456, in run_cmd
>     **dict((k, getattr(options, k)) for k in kwarg)
>   File "/usr/lib/python2.7/dist-packages/alembic/command.py", line 174, in upgrade
>     script.run_env()
>   File "/usr/lib/python2.7/dist-packages/alembic/script/base.py", line 407, in run_env
>     util.load_python_file(self.dir, 'env.py')
>   File "/usr/lib/python2.7/dist-packages/alembic/util/pyfiles.py", line 93, in load_python_file
>     module = load_module_py(module_id, path)
>   File "/usr/lib/python2.7/dist-packages/alembic/util/compat.py", line 79, in load_module_py
>     mod = imp.load_source(module_id, path, fp)
>   File "config/env.py", line 137, in <module>
>     run_migrations_offline()
>   File "config/env.py", line 48, in run_migrations_offline
>     context.run_migrations()
>   File "<string>", line 8, in run_migrations
>   File "/usr/lib/python2.7/dist-packages/alembic/runtime/environment.py", line 797, in run_migrations
>     self.get_context().run_migrations(**kw)
>   File "/usr/lib/python2.7/dist-packages/alembic/runtime/migration.py", line 312, in run_migrations
>     step.migration_fn(**kw)
>   File "/home/f.floimair/git/asterisk/contrib/ast-db-manage/config/versions/f3d1c5d38b56_add_prune_on_boot.py", line 22, in upgrade
>     yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
> NameError: global name 'ENUM' is not defined
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list