[ovirt-users] Re: Deploy oVirt Engine fail behind proxy
Il giorno mer 11 nov 2020 alle ore 11:01 Yedidyah Bar David ha scritto: > On Wed, Nov 11, 2020 at 11:49 AM Matteo Bonardi wrote: > > > > Hi Didi, > > > > > On Tue, Nov 10, 2020 at 7:18 PM Strahil Nikolov via Users > > > > > > > > I already suggested to open a bug for this earlier in this thread. > > > > I will open a bug for that. > > Thanks. > > > > > > I am not sure. I talked with Sandro about this, and we agreed that a > > > common enterprise requirement is being able to use a local _mirror_ > > > (e.g. Foreman), mainly for disconnected use (without an Internet > > > connection). A proxy is technically quite different, even if in > > > principle can be used for the same need. > > > > > > > I can understand your point, but since the deploy script already checks > that the proxy is set, I don't see why it can't pass this information to > the engine. > > Sorry, where? > Sincerely I didn't read the code, but reading the log there are more than one reference to proxy. For example: 2020-11-10 18:15:48,518+0100 WARNING otopi.plugins.gr_he_common.network.gateway gateway._setup:88 It seems that this host is configured to use a *proxy*, please ensure that this host will be able to reach the engine VM trough that proxy or add a specific exception. 2020-11-10 18:15:49,637+0100 DEBUG otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils.run:197 ansible-playbook: env: {'LS_COLORS': [..], 'USER': 'root', 'PWD': '', 'HOME': '', 'SSH_CLIENT': '', *'https_proxy': 'http://10.248.2.50:3128/ <http://10.248.2.50:3128/>', 'http_proxy': 'http://10.248.2.50:3128/ <http://10.248.2.50:3128/>', 'no_proxy': '.'*, 'SSH_TTY': '/dev/pts/0', 'MAIL': '/var/spool/mail/root', 'SHELL': '/bin/bash', 'TERM': 'xterm', 'SHLVL': '1', 'PYTHONPATH': '/usr/share/ovirt-hosted-engine-setup/scripts/..:',[..], 'HE_ANSIBLE_LOG_PATH': '/var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-ansible-get_network_interfaces-20201110181549-tppuv6.log'} 2020-11-10 18:17:11,505+0100 INFO otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:111 TASK [ovirt.ovirt.hosted_engine_setup : *Check http/https proxy*] I'm not sure at all, but the log makes me think the proxy is being checked more than once. Of course I can be wrong. > Also: > > On Wed, Nov 11, 2020 at 11:39 AM Matteo Bonardi wrote: > > > > Thanks to all yours suggestions I, finally, complete the deploy with > success. > > The solution is been to edit the file > /usr/share/ansible/roles/ovirt.engine-setup/tasks/install_packages.yml > adding the proxy variable: > > Which version? > > Perhaps you had 4.4.2 and then updated to 4.4.3 before retrying, or > something similar? > Before retry the deploy, I have completely cleanup the installation with: [root@ ~]# ovirt-hosted-engine-cleanup [root@ ~]# yum remove ovirt-* And then reinstall all: [root@ ~]# yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm [root@ ~]# yum install ovirt-engine-appliance [root@ ~]# yum install ovirt-hosted-engine-setup I am a bit confused on how to check the version (it is embarrassing, but I am new on ovirt and ansible). There is a mismatch between the version in deployment server and in engine vm. I have attached the rpm version of both. The manager web console shows 4.4.2 as version. > > > > - name: Install oVirt Engine package > > package: > > name: "ovirt-engine" > > state: present > > environment: > > https_proxy: "http://:" > > http_proxy: "http://:" > > ftp_proxy: "http://:" > > when: ovirt_engine_setup_product_type | lower == 'ovirt' > > [..] > > > > One suggestion for who will have the same problem: > > This file was created by the first failed run of the deploy. > > Without run the deploy, this file does not exists. > > So you have to run the deploy one time, let it fail and then edit the > file. > > I know that it seems a stupid suggestion but i think could help someone. > > It's not stupid! :-). I think you unknowingly ran into something > caused by the move to ovirt-ansible-roles in 4.4.3 [1]. > > Until 4.4.2, this file was in the package ovirt-ansible-engine-setup , in: > > /usr/share/ansible/roles/ovirt.engine-setup/tasks/install_packages.yml > > In 4.4.3, this file, along with many others (including hosted-engine > ansible code), is in ovirt-ansible-collection, in: > > > /usr/share/ansible/collections/ansible_collections/ovirt/ovirt/roles/engine_setup/tasks/install_packages.yml > > Can't guess, though, your exact flow - if you suspect a bug, please > check/share relevant logs (including dnf, but perhap
[ovirt-users] Re: Deploy oVirt Engine fail behind proxy
Hi Didi, > On Tue, Nov 10, 2020 at 7:18 PM Strahil Nikolov via Users > > I already suggested to open a bug for this earlier in this thread. I will open a bug for that. > I am not sure. I talked with Sandro about this, and we agreed that a > common enterprise requirement is being able to use a local _mirror_ > (e.g. Foreman), mainly for disconnected use (without an Internet > connection). A proxy is technically quite different, even if in > principle can be used for the same need. > I can understand your point, but since the deploy script already checks that the proxy is set, I don't see why it can't pass this information to the engine. > Best regards, Regards, Matteo ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/47RCLJWNUXFCALQ5ZYISEE2CYDT3AY4Q/
[ovirt-users] Re: Deploy oVirt Engine fail behind proxy
Thanks to all yours suggestions I, finally, complete the deploy with success. The solution is been to edit the file /usr/share/ansible/roles/ovirt.engine-setup/tasks/install_packages.yml adding the proxy variable: - name: Install oVirt Engine package package: name: "ovirt-engine" state: present environment: https_proxy: "http://:" http_proxy: "http://:" ftp_proxy: "http://:" when: ovirt_engine_setup_product_type | lower == 'ovirt' [..] One suggestion for who will have the same problem: This file was created by the first failed run of the deploy. Without run the deploy, this file does not exists. So you have to run the deploy one time, let it fail and then edit the file. I know that it seems a stupid suggestion but i think could help someone. Thank you all for the help! Best regards, Matteo ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/IMHIBGCFIED32NIOBZCUXIPVAGFNSDJZ/
[ovirt-users] Re: Deploy oVirt Engine fail behind proxy
Hi Strahil, How can I define that task and pass it to the deploy? Thanks, Matteo Il mar 10 nov 2020, 16:33 Strahil Nikolov ha scritto: > Did anyone try to define a task to deploy the variables in the > HostedEngine before the task? > > For example (take only the task): > --- > - name: Deploy proxy > hosts: localhost > tasks: > - name: Deploy_proxy >blockinfile: > block: >http_proxy=http://myproxy.localdomain:3399 >https_proxy=https://myproxy.localdomain:3340 >no_proxy=localhost > create: True > mode: "0444" > owner: "root" > selevel: "s0" > serole: "object_r" > setype: "bin_t" > seuser: "system_u" > state: "present" > path: "/etc/profile.d/proxy.sh" >delegate_to: localhost > > And the result is: > [root@engine ~]# echo $http_proxy > http://myproxy.localdomain:3399 > [root@engine ~]# echo $https_proxy > https://myproxy.localdomain:3340 > [root@engine ~]# echo $no_proxy > localhost > > > Best Regards, > Strahil Nikolov > > > > > > > > В вторник, 10 ноември 2020 г., 12:17:52 Гринуич+2, Gianluca Cecchi < > gianluca.cec...@gmail.com> написа: > > > > > > On Tue, Nov 10, 2020 at 8:55 AM Matteo Bonardi wrote: > >> On Tue, Nov 10, 2020 at 9:14 AM Matteo Bonardi wrote: > >> > >> Someone recently reported on this list that setting both environment > >> variables http_proxy and https_proxy worked for them. > > > > > > yes it was me here: > > https://lists.ovirt.org/archives/list/users@ovirt.org/message/D5WQSM7OZNKJQK3L5CN367W2TRVZZVHZ/ > > But in my case it was simpler because the engine was external. > With hosted engine it is indeed a problem that should be addressed I think > > Gianluca > > > ___ > Users mailing list -- users@ovirt.org > To unsubscribe send an email to users-le...@ovirt.org > Privacy Statement: https://www.ovirt.org/privacy-policy.html > oVirt Code of Conduct: > https://www.ovirt.org/community/about/community-guidelines/ > List Archives: > > https://lists.ovirt.org/archives/list/users@ovirt.org/message/RJ4MQDQDJUNE67FHXI5C5SP62FO6RTLY/ > > ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/X6DEOI4SGSQ2GWMFPB76NQL6E5U7SETN/
[ovirt-users] Re: Deploy oVirt Engine fail behind proxy
> On Tue, Nov 10, 2020 at 9:14 AM Matteo Bonardi > Someone recently reported on this list that setting both environment > variables http_proxy and https_proxy worked for them. Hi Didi, Thanks for reply. My proxy settings are the following: [root@myhost ~]# env | grep proxy https_proxy=http://10.248.2.50:3128/ http_proxy=http://10.248.2.50:3128/ ftp_proxy=http://10.248.2.50:3128/ [root@myhost ~]# cat /etc/yum.conf [main] gpgcheck=1 installonly_limit=3 clean_requirements_on_remove=True best=True skip_if_unavailable=False proxy=http://10.248.2.50:3128 Regards, Matteo > I didn't try this myself recently. > > Best regards, ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/DJI7IFUQ6FPDYIVDHAPDXVLY4BGOIZI4/
[ovirt-users] Deploy oVirt Engine fail behind proxy
Hi, I am trying to deploy the ovirt engine following self-hosted engine installation procedure on documentation. Deployment servers are behind a proxy and I have set it in environment and in yum.conf before run deploy. Deploy fails because ovirt engine vm cannot resolve AppStream repository url: [ INFO ] TASK [ovirt.engine-setup : Install oVirt Engine package] [ ERROR ] fatal: [localhost -> ovirt-manager.mydomain]: FAILED! => {"changed": false, "msg": "Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8=x86_64=AppStream=stock [Could not resolve host: mirrorlist.centos.org]", "rc": 1, "results": []} [ ERROR ] Failed to execute stage 'Closing up': Failed executing ansible-playbook [ INFO ] Stage: Clean up [ INFO ] Cleaning temporary resources [ INFO ] TASK [ovirt.hosted_engine_setup : Execute just a specific set of steps] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Force facts gathering] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Fetch logs from the engine VM] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Set destination directory path] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Create destination directory] [ INFO ] changed: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : include_tasks] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Find the local appliance image] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Set local_vm_disk_path] [ INFO ] skipping: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Give the vm time to flush dirty buffers] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Copy engine logs] [ INFO ] TASK [ovirt.hosted_engine_setup : include_tasks] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Remove local vm dir] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Remove temporary entry in /etc/hosts for the local VM] [ INFO ] changed: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Clean local storage pools] [ INFO ] ok: [localhost] [ INFO ] TASK [ovirt.hosted_engine_setup : Destroy local storage-pool {{ he_local_vm_dir | basename }}] [ INFO ] TASK [ovirt.hosted_engine_setup : Undefine local storage-pool {{ he_local_vm_dir | basename }}] [ INFO ] TASK [ovirt.hosted_engine_setup : Destroy local storage-pool {{ local_vm_disk_path.split('/')[5] }}] [ INFO ] TASK [ovirt.hosted_engine_setup : Undefine local storage-pool {{ local_vm_disk_path.split('/')[5] }}] [ INFO ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20201109165237.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ ERROR ] Hosted Engine deployment failed: please check the logs for the issue, fix accordingly or re-deploy from scratch. Log file is located at /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20201109164244-b3e8sd.log How I can set proxy for the engine vm? Ovirt version: [root@myhost ~]# rpm -qa | grep ovirt-engine-appliance ovirt-engine-appliance-4.4-20200916125954.1.el8.x86_64 [root@myhost ~]# rpm -qa | grep ovirt-hosted-engine-setup ovirt-hosted-engine-setup-2.4.6-1.el8.noarch OS version: [root@myhost ~]# cat /etc/centos-release CentOS Linux release 8.2.2004 (Core) [root@myhost ~]# uname -a Linux myhost.mydomain 4.18.0-193.28.1.el8_2.x86_64 #1 SMP Thu Oct 22 00:20:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux Thanks for the help. Regards, Matteo ___ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-le...@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/VHVZF6H3VM4ZUK5HRP3HUIC26UBLXWFM/