2017-09-24 15 views
0

Vous tentez de contribuer au flux d'air, mais vous ne pouvez pas mettre en place la tox sur Ubuntu 16.0.4. Quelque chose se passe avec kerbos.Erreur lors de l'exécution de tox pour le flux d'air

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' 

Je ne sais pas où commencer même avec cela. Je pense avoir installé tous les services.

+0

Veuillez ajouter un lien vers le projet. Ce n'est pas un problème avec tox BTW. –

+0

oui je ne pense pas que ce soit un "problème" avec tox, je suis sûr que c'est question de config. – Dalupus

+0

@Dalupus Avez-vous trouvé une solution à ce problème? Je reçois la même chose, dans Travis CI construit pour Airflow (https://travis-ci.org/ahh2131/incubator-airflow/jobs/285393754#L8831) –

Répondre

1

Le script scripts/ci/setup_kdc.sh est exécuté sous sudo et sudo efface les variables d'environnement, donc ${KRB5_KTNAME} n'est pas défini.

La commande sudo est utilisé dans tox.ini mais tox ne trouve pas dans ses environnements virtuels (bien sûr, il ne fonctionne pas - sudo est une commande de système qui ne doit pas être installé dans un venv.) La commande doit être whitelisted à tox.ini dans la section [testenv]:

[testenv] 
whitelist_externals = 
    sudo 

Ce sont des bugs dans airflow, s'il vous plaît envoyer une demande de tirage ou un rapport de bogue.

+0

hmm ... est-ce vraiment le problème? AFAIK Si un programme n'est pas ajouté à la liste blanche, il fonctionnera toujours mais tox affichera un avertissement que vous devriez l'ajouter à la liste blanche. –

+1

@OliverBestwalter Vous avez raison. J'ai étendu la réponse. Merci. – phd