Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wal-g An unknown error occurred: URL can't contain control characters. (found at least '\n') #445

Closed
rrrru opened this issue Aug 21, 2023 · 15 comments
Assignees

Comments

@rrrru
Copy link
Contributor

rrrru commented Aug 21, 2023

TASK [wal-g : Download Go v1.21.0
time 2023-08-04T20:14:06Z] ********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [23.88.61.10]: FAILED! => {"changed": false, "dest": "/tmp/", "elapsed": 0, "gid": 0, "group": "root", "mode": "01777", "msg": "An unknown error occurred: URL can't contain control characters. '/dl/go1.21.0\\ntime 2023-08-04T20:14:06Z.linux-amd64.tar.gz' (found at least '\\n')", "owner": "root", "size": 4096, "state": "directory", "uid": 0, "url": "https://go.dev/dl/go1.21.0\ntime 2023-08-04T20:14:06Z.linux-amd64.tar.gz"}
fatal: [78.47.240.239]: FAILED! => {"changed": false, "dest": "/tmp/", "elapsed": 0, "gid": 0, "group": "root", "mode": "01777", "msg": "An unknown error occurred: URL can't contain control characters. '/dl/go1.21.0\\ntime 2023-08-04T20:14:06Z.linux-amd64.tar.gz' (found at least '\\n')", "owner": "root", "size": 4096, "state": "directory", "uid": 0, "url": "https://go.dev/dl/go1.21.0\ntime 2023-08-04T20:14:06Z.linux-amd64.tar.gz"}
fatal: [5.75.129.55]: FAILED! => {"changed": false, "dest": "/tmp/", "elapsed": 0, "gid": 0, "group": "root", "mode": "01777", "msg": "An unknown error occurred: URL can't contain control characters. '/dl/go1.21.0\\ntime 2023-08-04T20:14:06Z.linux-amd64.tar.gz' (found at least '\\n')", "owner": "root", "size": 4096, "state": "directory", "uid": 0, "url": "https://go.dev/dl/go1.21.0\ntime 2023-08-04T20:14:06Z.linux-amd64.tar.gz"}

Looks like they change output for https://go.dev/VERSION?m=text, so wal_g_latest_version contain time now.

I suggest we do something like this

# roles/wal-g/tasks/main.yml
    - name: Check the latest available Go version
      ansible.builtin.shell: |
        set -o pipefail;
        curl -s https://go.dev/VERSION?m=text | head -n1 |tr -d 'go'
      args:
        executable: /bin/bash
      changed_when: false
      register: wal_g_latest_version

Variable:
wal_g_install: true
OS: Debian 12

Thanks!

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

And the make package for dependencies seems to have been lost ( in roles/wal-g/tasks/main.yml )

TASK [wal-g : Build WAL-G deps] ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [23.88.61.10]: FAILED! => {"changed": false, "msg": "Failed to find required executable \"make\" in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin"}

@rrrru rrrru changed the title TASK wal-g : Download Go v1.21.0 wal-g An unknown error occurred: URL can't contain control characters. (found at least '\n') Aug 21, 2023
@vitabaks
Copy link
Owner

Thanks @rrrru

@vitabaks
Copy link
Owner

Fixed here #446

@vitabaks
Copy link
Owner

And the make package for dependencies seems to have been lost ( in roles/wal-g/tasks/main.yml )

this is strange since we are installing the cmake package.

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

And the make package for dependencies seems to have been lost ( in roles/wal-g/tasks/main.yml )

this is strange since we are installing the cmake package.

apt install cmake
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cmake-data libarchive13 libjsoncpp25 librhash0
Suggested packages:
  cmake-doc cmake-format elpa-cmake-mode ninja-build lrzip
Recommended packages:
  gcc make
The following NEW packages will be installed:
  cmake cmake-data libarchive13 libjsoncpp25 librhash0
0 upgraded, 5 newly installed, 0 to remove and 34 not upgraded.
Need to get 11.3 MB of archives.
After this operation, 41.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]

@vitabaks
Copy link
Owner

the build problem has not been reproduced

TASK [wal-g : Download WAL-G v2.0.1 source code] *******************************
changed: [10.172.0.21]
changed: [10.172.0.22]
changed: [10.172.0.20]

TASK [wal-g : Build WAL-G deps] ************************************************
changed: [10.172.0.20]
changed: [10.172.0.22]
changed: [10.172.0.21]

TASK [wal-g : Build and install WAL-G] *****************************************
changed: [10.172.0.22]
changed: [10.172.0.20]
changed: [10.172.0.21]

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

jobs:
  test:
    runs-on: ubuntu-latest

̶A̶l̶l̶ ̶t̶e̶s̶t̶s̶ ̶u̶s̶e̶ ̶u̶b̶u̶n̶t̶u̶-̶l̶a̶t̶e̶s̶t̶?̶

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

And make In dependencies, I use the base image to install without previously installed packages, used hetzner cloud and from base images

@vitabaks
Copy link
Owner

That makes sense, thanks.

I will add the make package

@vitabaks
Copy link
Owner

@rrrru please test walg-go branch

commit: bac23b1

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

fatal: [xxxxx]: FAILED! => {"changed": false, "cmd": ["/usr/bin/pip3", "install", "-U", "--trusted-host=pypi.python.org", "--trusted-host=pypi.org", "--trusted-host=files.pythonhosted.org", "setuptools<66.0.0"], "msg": "\n:stderr: error: externally-managed-environment\n\n× This environment is externally managed\n╰─> To install Python packages system-wide, try apt install\n    python3-xyz, where xyz is the package you are trying to\n    install.\n    \n    If you wish to install a non-Debian-packaged Python package,\n    create a virtual environment using python3 -m venv path/to/venv.\n    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make\n    sure you have python3-full installed.\n    \n    If you wish to install a non-Debian packaged Python application,\n    it may be easiest to use pipx install xyz, which will manage a\n    virtual environment for you. Make sure you have pipx installed.\n    \n    See /usr/share/doc/python3.11/README.venv for more information.\n\nnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.\nhint: See PEP 668 for the detailed specification.\n"}

Wal-g tasks looks good.

Fix after exec rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED

https://github.com/geerlingguy/docker-debian12-ansible/blob/2521096d575d1a2ac94d40d171650887ed3ba588/Dockerfile#L20

@vitabaks
Copy link
Owner

Wal-g tasks looks good.

Ok

Fix after exec rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED

Yes, there is such a thing in new OS versions. I'm automating this part.

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

Will it work if I disable pgbouncer in the variables?

@vitabaks
Copy link
Owner

I don't quite understand what pgbouncer has to do with it?

@rrrru
Copy link
Contributor Author

rrrru commented Aug 21, 2023

I don't quite understand what pgbouncer has to do with it?

Right,it's another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@vitabaks @rrrru and others