Roots Discourse

Mariadb mirror

Hello

Anyone having any issues connecting mariaDB mirror

This is the error I am getting when I do vagrant reload --provision

failed: [default] => (item=deb http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu trusty main) => {"failed": true, "item": "deb http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu trusty main", "parsed": false}
BECOME-SUCCESS-mmmlpfvhfjsxqvhgdpatosmwlohcveuo
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1461700754.01-112658882921448/apt_repository", line 2881, in <module>
    main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1461700754.01-112658882921448/apt_repository", line 464, in main
    cache.update()
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 440, in update
    raise FetchFailedException(e)
apt.cache.FetchFailedException: W:Failed to fetch http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found [IP: 192.241.164.26 80]
, E:Some index files failed to download. They have been ignored, or old ones used instead.
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
Shared connection to 127.0.0.1 closed.

failed: [default] => (item=deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu trusty main) => {"failed": true, "item": "deb-src http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu trusty main", "parsed": false}
BECOME-SUCCESS-vfyvtwrjiltuibyotlamylnqxrrdmmwv
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1461700757.66-24700969091296/apt_repository", line 2881, in <module>
    main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1461700757.66-24700969091296/apt_repository", line 464, in main
    cache.update()
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 440, in update
    raise FetchFailedException(e)
apt.cache.FetchFailedException: W:Failed to fetch http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu/dists/trusty/main/source/Sources  404  Not Found [IP: 192.241.164.26 80]
, W:Failed to fetch http://nyc2.mirrors.digitalocean.com/mariadb/repo//ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found [IP: 192.241.164.26 80]
, E:Some index files failed to download. They have been ignored, or old ones used instead.
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: auto-mux: Trying existing master
debug1: mux_client_request_session: master session id: 2
Shared connection to 127.0.0.1 closed.

It looks like you’re missing the version number.

1 Like

I just looked in the file and the version number is there

/learn.med/learn-med-stack/roles/mariadb/defaults/main.yml:
keyserver_fingerprint: "0xcbcb082a1bb943db"
mirror: nyc2.mirrors.digitalocean.com
version: “10.0”

That’s pretty weird. You could try just hardcoding the version in there because it doesn’t seem to be “templating” it properly. Here is where its done: https://github.com/roots/trellis/blob/ed6c63587adb3ffbdd60f64644470d9f7d81d13d/roles/mariadb/tasks/main.yml#L12-L13

1 Like

Running into this too on Ansible 1.9.6

Hardcoding of course works.

In roles/mariadb/defaults/main.yml if you change the variable name from “version” to “mirror_version” it works.

This was fixed in later versions of trellis https://github.com/roots/trellis/blob/master/roles/mariadb/defaults/main.yml#L4