[
https://issues.apache.org/jira/browse/AIRFLOW-2013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ash Berlin-Taylor closed AIRFLOW-2013.
--------------------------------------
Resolution: Cannot Reproduce
If anyone is still having this problem with the current version of Airflow
please comment/reopen this ticket and we can look in to it.
Sorry we didn't respond when originally reported.
> initdb problem on airflow - python 2.7 - centos
> -----------------------------------------------
>
> Key: AIRFLOW-2013
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2013
> Project: Apache Airflow
> Issue Type: Bug
> Components: database
> Reporter: giacomo veneri
> Priority: Major
> Labels: mysql
>
> {{export AIRFLOW_HOME=/opt/airflow/}}
> {{pip install --ignore-installed setuptools }}
> {{pip install --ignore-installed celery}}
> {{pip install --ignore-installed fernet}}
> {{pip install --ignore-installed airflow}}
> {{pip install --ignore-installed airflow[hive]}}
> {{pip install --ignore-installed airflow[celery]}}
>
> I get
>
> {{[2018-01-19 08:00:36,703] \{__init__.py:57} INFO - Using executor
> SequentialExecutor}}
> {{DB: sqlite:////opt/airflow//airflow.db}}
> {{This will drop existing tables if they exist. Proceed? (y/n)y}}
> {{[2018-01-19 08:00:53,097] \{db.py:303} INFO - Dropping tables that exist}}
> {{[2018-01-19 08:00:53,169] \{migration.py:116} INFO - Context impl
> SQLiteImpl.}}
> {{[2018-01-19 08:00:53,169] \{migration.py:121} INFO - Will assume
> non-transactional DDL.}}
> {{[2018-01-19 08:00:53,173] \{db.py:287} INFO - Creating tables}}
> {{INFO [alembic.runtime.migration] Context impl SQLiteImpl.}}
> {{INFO [alembic.runtime.migration] Will assume non-transactional DDL.}}
> {{INFO [alembic.runtime.migration] Running upgrade -> e3a246e0dc1, current
> schema}}
> {{INFO [alembic.runtime.migration] Running upgrade e3a246e0dc1 ->
> 1507a7289a2f, create is_encrypted}}
> {{/usr/lib/python2.7/site-packages/alembic/util/messaging.py:69: UserWarning:
> Skipping unsupported ALTER for creation of implicit constraint}}
> {{ warnings.warn(msg)}}
> {{INFO [alembic.runtime.migration] Running upgrade 1507a7289a2f ->
> 13eb55f81627, maintain history for compatibility with earlier migrations}}
> {{INFO [alembic.runtime.migration] Running upgrade 13eb55f81627 ->
> 338e90f54d61, More logging into task_isntance}}
> {{INFO [alembic.runtime.migration] Running upgrade 338e90f54d61 ->
> 52d714495f0, job_id indices}}
> {{INFO [alembic.runtime.migration] Running upgrade 52d714495f0 ->
> 502898887f84, Adding extra to Log}}
> {{INFO [alembic.runtime.migration] Running upgrade 502898887f84 ->
> 1b38cef5b76e, add dagrun}}
> {{INFO [alembic.runtime.migration] Running upgrade 1b38cef5b76e ->
> 2e541a1dcfed, task_duration}}
> {{INFO [alembic.runtime.migration] Running upgrade 2e541a1dcfed ->
> 40e67319e3a9, dagrun_config}}
> {{INFO [alembic.runtime.migration] Running upgrade 40e67319e3a9 ->
> 561833c1c74b, add password column to user}}
> {{INFO [alembic.runtime.migration] Running upgrade 561833c1c74b ->
> 4446e08588, dagrun start end}}
> {{INFO [alembic.runtime.migration] Running upgrade 4446e08588 ->
> bbc73705a13e, Add notification_sent column to sla_miss}}
> {{INFO [alembic.runtime.migration] Running upgrade bbc73705a13e ->
> bba5a7cfc896, Add a column to track the encryption state of the 'Extra' field
> in connection}}
> {{INFO [alembic.runtime.migration] Running upgrade bba5a7cfc896 ->
> 1968acfc09e3, add is_encrypted column to variable table}}
> {{INFO [alembic.runtime.migration] Running upgrade 1968acfc09e3 ->
> 2e82aab8ef20, rename user table}}
> {{INFO [alembic.runtime.migration] Running upgrade 2e82aab8ef20 ->
> 211e584da130, add TI state index}}
> {{INFO [alembic.runtime.migration] Running upgrade 211e584da130 ->
> 64de9cddf6c9, add task fails journal table}}
> {{INFO [alembic.runtime.migration] Running upgrade 64de9cddf6c9 ->
> f2ca10b85618, add dag_stats table}}
> {{INFO [alembic.runtime.migration] Running upgrade f2ca10b85618 ->
> 4addfa1236f1, Add fractional seconds to mysql tables}}
> {{INFO [alembic.runtime.migration] Running upgrade 4addfa1236f1 ->
> 8504051e801b, xcom dag task indices}}
> {{INFO [alembic.runtime.migration] Running upgrade 8504051e801b ->
> 5e7d17757c7a, add pid field to TaskInstance}}
> {{INFO [alembic.runtime.migration] Running upgrade 5e7d17757c7a ->
> 127d2bf2dfa7, Add dag_id/state index on dag_run table}}
> {{INFO [alembic.runtime.migration] Running upgrade 127d2bf2dfa7 ->
> cc1e65623dc7, add max tries column to task instance}}
> {{Traceback (most recent call last):}}
> {{ File "/usr/bin/airflow", line 28, in <module>}}
> {{ args.func(args)}}
> {{ File "/usr/lib/python2.7/site-packages/airflow/bin/cli.py", line 919, in
> resetdb}}
> {{ db_utils.resetdb()}}
> {{ File "/usr/lib/python2.7/site-packages/airflow/utils/db.py", line 308, in
> resetdb}}
> {{ initdb()}}
> {{ File "/usr/lib/python2.7/site-packages/airflow/utils/db.py", line 106, in
> initdb}}
> {{ upgradedb()}}
> {{ File "/usr/lib/python2.7/site-packages/airflow/utils/db.py", line 294, in
> upgradedb}}
> {{ command.upgrade(config, 'heads')}}
> {{ File "/usr/lib/python2.7/site-packages/alembic/command.py", line 174, in
> upgrade}}
> {{ script.run_env()}}
> {{ File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 416,
> in run_env}}
> {{ util.load_python_file(self.dir, 'env.py')}}
> {{ File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93,
> in load_python_file}}
> {{ module = load_module_py(module_id, path)}}
> {{ File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79,
> in load_module_py}}
> {{ mod = imp.load_source(module_id, path, fp)}}
> {{ File "/usr/lib/python2.7/site-packages/airflow/migrations/env.py", line
> 86, in <module>}}
> {{ run_migrations_online()}}
> {{ File "/usr/lib/python2.7/site-packages/airflow/migrations/env.py", line
> 81, in run_migrations_online}}
> {{ context.run_migrations()}}
> {{ File "<string>", line 8, in run_migrations}}
> {{ File "/usr/lib/python2.7/site-packages/alembic/runtime/environment.py",
> line 807, in run_migrations}}
> {{ self.get_context().run_migrations(**kw)}}
> {{ File "/usr/lib/python2.7/site-packages/alembic/runtime/migration.py", line
> 321, in run_migrations}}
> {{ step.migration_fn(**kw)}}
> {{ File
> "/usr/lib/python2.7/site-packages/airflow/migrations/versions/cc1e65623dc7_add_max_tries_column_to_task_instance.py",
> line 53, in upgrade}}
> {{ query = session.query(sa.func.count(TaskInstance.max_tries)).filter(}}
> {{AttributeError: type object 'TaskInstance' has no attribute 'max_tries'}}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)