2017-09-24 76 views
0

試圖促成氣流,但不能在Ubuntu 16.0.4上運行並運行。一些事情正在與kerbos進行。錯誤運行tox for airflow

https://github.com/apache/incubator-airflow

py34-hdp-airflow_backend_postgres runtests: commands[2] | sudo /home/dalupus/incubator-airflow/scripts/ci/setup_kdc.sh 
WARNING:test command found but not installed in testenv 
    cmd: /usr/bin/sudo 
    env: /home/dalupus/incubator-airflow/.tox/py34-hdp-airflow_backend_postgres 
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting. 
127.0.0.1 localhost 
127.0.1.1 ubuntu 

# The following lines are desirable for IPv6 capable hosts 
::1  ip6-localhost ip6-loopback 
fe00::0 ip6-localnet 
ff00::0 ip6-mcastprefix 
ff02::1 ip6-allnodes 
ff02::2 ip6-allrouters 
hostname: ubuntu 
Loading random data 
Initializing database '/etc/krb5kdc/principal' for realm 'TEST.LOCAL', 
master key name 'K/[email protected]' 
You will be prompted for the database Master Password. 
It is important that you NOT FORGET this password. 
Enter KDC database master key: 
Re-enter KDC database master key to verify: 
kdb5_util: File exists while creating database '/etc/krb5kdc/principal' 
Authenticating as principal root/[email protected] with password. 
WARNING: no policy specified for admin/[email protected]; defaulting to no policy 
Enter password for principal "admin/[email protected]": 
Re-enter password for principal "admin/[email protected]": 
add_principal: Principal or policy already exists while creating "admin/[email protected]". 
Authenticating as principal root/[email protected] with password. 
WARNING: no policy specified for [email protected]; defaulting to no policy 
add_principal: Principal or policy already exists while creating "[email protected]". 
Authenticating as principal root/[email protected] with password. 
WARNING: no policy specified for airflow/[email protected]; defaulting to no policy 
add_principal: Principal or policy already exists while creating "airflow/[email protected]". 
Authenticating as principal root/[email protected] with password. 
Usage: ktadd [-k[eytab] keytab] [-q] [-e keysaltlist] [-norandkey] [principal | -glob princ-exp] [...] 
Authenticating as principal root/[email protected] with password. 
Usage: ktadd [-k[eytab] keytab] [-q] [-e keysaltlist] [-norandkey] [principal | -glob princ-exp] [...] 
chmod: missing operand after ‘664’ 
Try 'chmod --help' for more information. 
ERROR: InvocationError: '/usr/bin/sudo /home/dalupus/incubator-airflow/scripts/ci/setup_kdc.sh' 

不知道從哪裏即使有這樣的開始。我想我已經安裝了所有的代碼。

+0

請將alink添加到項目中。這不是BTX的問題。 –

+0

是的,我不認爲這是一個「問題」,我相信這是配置問題。 – Dalupus

+0

@達盧普斯你找到了解決方案嗎?我得到了同樣的東西,在Travis CI爲Airflow構建(https://travis-ci.org/ahh2131/incubator-airflow/jobs/285393754#L8831) –

回答

1

腳本scripts/ci/setup_kdc.sh運行在sudosudo清除環境變量,所以${KRB5_KTNAME}沒有定義。

命令sudotox.ini使用,但tox在其虛擬環境中沒有找到它(當然它不會 - sudo是不應該被安裝在一個VENV系統命令)命令必須是在部分[testenv]tox.ini列入白名單:

[testenv] 
whitelist_externals = 
    sudo 

這些都是airflow錯誤,請把他們拉請求或bug報告。

+0

嗯...可真的是這個問題嗎? AFAIK如果一個程序沒有列入白名單,它仍然可以工作,但是tox會打印一個警告,您應該將其列入白名單。 –

+1

@OliverBestwalter你說得對。我擴大了答案。謝謝。 – phd