Bug 1563427

Summary: pkg_resources.DistributionNotFound: The 'pyyaml' distribution was not found and is required by cloudflare
Product: [Fedora] Fedora Reporter: Leonardo Amaral <contato>
Component: python-certbot-dns-cloudflareAssignee: Nick Bebout <nb>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 27CC: elyscape, itamar, nb
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-06 15:02:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leonardo Amaral 2018-04-03 23:15:19 UTC
Description of problem:

Installing python3-certbot-dns-cloudflare-0.22.2-1.fc27.noarch results in a pyyaml missing dependency

Version-Release number of selected component (if applicable):

python3-certbot-dns-cloudflare-0.22.2-1.fc27.noarch

How reproducible:

Always

Steps to Reproduce:
1. Run dnf install python3-certbot-dns-cloudflare
2. Run certbot plugins

Actual results:
[root@manaira ~]# dnf install python3-certbot-dns-cloudflare                                                     
Última verificação de data de vencimento de metadados: 1:45:09 atrás em ter 03 abr 2018 18:18:10 -03.            
Dependências resolvidas.                                
=======================================================================================================================================================                                                                            
 Pacote                                              Arq.                        Versão                             Repo                          Tam.                                                                             
=======================================================================================================================================================                                                                            
Instalando:                                             
 python3-certbot-dns-cloudflare                      noarch                      0.22.2-1.fc27                      updates                       23 k                                                                             
Instalando dependências:                                                                                         
 python3-cloudflare                                  noarch                      2.0.4-1.fc27                       updates                       54 k                                                                             
                                                        
Resumo da transação                                                                                              
=======================================================================================================================================================                                                                            
Instalar  2 Pacotes                                     

Tamanho total do download: 77 k
Tamanho depois de instalado: 294 k
Correto? [s/N]:s
Baixando pacotes:
(1/2): python3-certbot-dns-cloudflare-0.22.2-1.fc27.noarch.rpm                                                          25 kB/s |  23 kB     00:00
(2/2): python3-cloudflare-2.0.4-1.fc27.noarch.rpm                                                                       56 kB/s |  54 kB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                   35 kB/s |  77 kB     00:02
Executando verificação da transação
Verificação de transação completa.
Executando teste de transação
Teste de transação completo
Executando a transação
  Preparando          :                                                                                                                            1/1
  Instalando          : python3-cloudflare-2.0.4-1.fc27.noarch                                                                                     1/2
  Instalando          : python3-certbot-dns-cloudflare-0.22.2-1.fc27.noarch                                                                        2/2
  Verificando         : python3-certbot-dns-cloudflare-0.22.2-1.fc27.noarch                                                                        1/2
  Verificando         : python3-cloudflare-2.0.4-1.fc27.noarch                                                                                     2/2

Instalados:
  python3-certbot-dns-cloudflare.noarch 0.22.2-1.fc27                              python3-cloudflare.noarch 2.0.4-1.fc27

Concluído!
[root@manaira ~]# certbot plugins
An unexpected error occurred:
pkg_resources.DistributionNotFound: The 'pyyaml' distribution was not found and is required by cloudflare
Please see the logfile '/tmp/tmpy1mlbqjx' for more details.


Expected results:

* dns-cloudflare
Description: Obtain certificates using a DNS TXT record (if you are using
Cloudflare for DNS).
Interfaces: IAuthenticator, IPlugin
Entry point: dns-cloudflare =
certbot_dns_cloudflare.dns_cloudflare:Authenticator

Additional info:

[root@manaira ~]# cat /tmp/tmpy1mlbqjx
2018-04-03 20:03:37,732:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
  File "/bin/certbot", line 11, in <module>
    load_entry_point('certbot==0.22.2', 'console_scripts', 'certbot')()
  File "/usr/lib/python3.6/site-packages/certbot/main.py", line 1240, in main
    plugins = plugins_disco.PluginsRegistry.find_all()
  File "/usr/lib/python3.6/site-packages/certbot/plugins/disco.py", line 200, in find_all
    plugin_ep = PluginEntryPoint(entry_point)
  File "/usr/lib/python3.6/site-packages/certbot/plugins/disco.py", line 46, in __init__
    self.plugin_cls = entry_point.load()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2401, in load
    self.require(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2424, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 870, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyyaml' distribution was not found and is required by cloudflare
2018-04-03 20:03:37,732:ERROR:certbot.log:An unexpected error occurred:

Comment 1 Leonardo Amaral 2018-04-03 23:17:09 UTC
Installing python3-PyYAML manually fixes the issue, so dependency is missing:

[root@manaira ~]# dnf install python3-yaml                                 
Última verificação de data de vencimento de metadados: 1:57:51 atrás em ter 03 abr 2018 18:18:10 -03.                                                  
Dependências resolvidas.             
=======================================================================================================================================================
 Pacote                                  Arq.                            Versão                                  Repo                             Tam. 
=======================================================================================================================================================
Instalando:                          
 python3-PyYAML                          x86_64                          3.12-5.fc27                             fedora                          182 k 

Resumo da transação                  
=======================================================================================================================================================
Instalar  1 Pacote                   

Tamanho total do download: 182 k     
Tamanho depois de instalado: 734 k   
Correto? [s/N]:s                     
Baixando pacotes:                    
python3-PyYAML-3.12-5.fc27.x86_64.rpm                                                                                  760 kB/s | 182 kB     00:00     
-------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                  100 kB/s | 182 kB     00:01     
Executando verificação da transação  
Verificação de transação completa.   
Executando teste de transação        
Teste de transação completo          
Executando a transação               
  Preparando          :                                                                                                                            1/1 
  Instalando          : python3-PyYAML-3.12-5.fc27.x86_64                                                                                          1/1 
  Verificando         : python3-PyYAML-3.12-5.fc27.x86_64                                                                                          1/1 

Instalados:                          
  python3-PyYAML.x86_64 3.12-5.fc27                                                                                                                    

Concluído!                           
[root@manaira ~]# certbot plugins                                                                                                                      
Saving debug log to /var/log/letsencrypt/letsencrypt.log                   

-------------------------------------------------------------------------------                                                                        
* dns-cloudflare                     
Description: Obtain certificates using a DNS TXT record (if you are using  
Cloudflare for DNS).                 
Interfaces: IAuthenticator, IPlugin  
Entry point: dns-cloudflare =        
certbot_dns_cloudflare.dns_cloudflare:Authenticator                        

* standalone                         
Description: Spin up a temporary webserver                                 
Interfaces: IAuthenticator, IPlugin  
Entry point: standalone = certbot.plugins.standalone:Authenticator         

* webroot                            
Description: Place files in webroot directory                              
Interfaces: IAuthenticator, IPlugin  
Entry point: webroot = certbot.plugins.webroot:Authenticator               
-------------------------------------------------------------------------------                                                                        
[root@manaira ~]#

Comment 2 Fedora Update System 2018-04-04 17:27:48 UTC
python-cloudflare-2.1.0-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-698090d212

Comment 3 Fedora Update System 2018-04-04 17:28:01 UTC
python-cloudflare-2.1.0-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c632893fe6

Comment 4 Fedora Update System 2018-04-04 17:28:35 UTC
python-cloudflare-2.1.0-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7fb8c9963a

Comment 5 Fedora Update System 2018-04-04 17:28:57 UTC
python-cloudflare-2.1.0-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-cc6f9e3a4c

Comment 6 Eli Young 2018-04-04 17:39:34 UTC
Sorry about that! I made a mistake when specifying the dependencies for the python3 package that resulted in none of them being actually requested at install time. I've submitted a fix, as you can see. Thanks for the catch!

Comment 7 Itamar Reis Peixoto 2018-04-04 17:53:38 UTC
Leonardo, 

por favor faca o teste de depois acesse o bodhi nos links acima, efetue o login e adicione karma +1 na atualizacao caso esteja tudo funcionando.

Comment 8 Fedora Update System 2018-04-05 15:49:55 UTC
python-cloudflare-2.1.0-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-698090d212

Comment 9 Fedora Update System 2018-04-05 16:03:42 UTC
python-cloudflare-2.1.0-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-cc6f9e3a4c

Comment 10 Leonardo Amaral 2018-04-05 19:02:54 UTC
Hello!

Ill test it here. Just allow me some time!

Thanks!

Comment 11 Fedora Update System 2018-04-05 19:13:02 UTC
python-cloudflare-2.1.0-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7fb8c9963a

Comment 12 Fedora Update System 2018-04-06 02:31:34 UTC
python-cloudflare-2.1.0-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c632893fe6

Comment 13 Fedora Update System 2018-04-06 11:09:48 UTC
python-cloudflare-2.1.0-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2018-04-06 14:37:20 UTC
python-cloudflare-2.1.0-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2018-04-06 15:02:34 UTC
python-cloudflare-2.1.0-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2018-04-06 20:33:20 UTC
python-cloudflare-2.1.0-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.