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

./update.sh fails on ansible install #3828

Closed
aconitumnapellus opened this issue Feb 19, 2021 · 7 comments
Closed

./update.sh fails on ansible install #3828

aconitumnapellus opened this issue Feb 19, 2021 · 7 comments
Labels
bug A part of the software's functionality doesn't work as expected. in progress A workaround, temporary or permanent fix is in progress upstream Involves software that is "upstream" from AzuraCast, i.e. broadcasting software or OS software.

Comments

@aconitumnapellus
Copy link
Contributor

Using Docker installation method
No

AzuraCast version
Rolling release, newest commit

Host Operating System
Ubuntu 20.04

Describe the bug
./update.sh on the ansible install fails at the composer stage when installing wikimedia/composer-merge-plugin

To Reproduce

  1. have working ansible installation
  2. execute ./update.sh
  3. wait for it to fail

Expected behavior
./update.sh should run through without an error

Relevant Logs

TASK [php : Install PHP 7.4] *****************************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [php : Configure PHP FPM Pool] **********************************************************************************************************************************************************************************************************
skipping: [localhost]

TASK [php : Configure php-fpm php.ini] *******************************************************************************************************************************************************************************************************
skipping: [localhost] => (item={'option': 'post_max_size', 'value': '50M'})
skipping: [localhost] => (item={'option': 'short_open_tag', 'value': 'On'})
skipping: [localhost] => (item={'option': 'upload_max_filesize', 'value': '50M'})

TASK [php : Configure php-cli php.ini] *******************************************************************************************************************************************************************************************************
skipping: [localhost] => (item={'option': 'short_open_tag', 'value': 'On'})

TASK [composer : Install Composer] ***********************************************************************************************************************************************************************************************************
changed: [localhost]

TASK [composer : Clear existing vendor folder] ***********************************************************************************************************************************************************************************************
changed: [localhost]

TASK [composer : Recreate vendor folder] *****************************************************************************************************************************************************************************************************
changed: [localhost]

TASK [composer : Ensure composer.lock exists] ************************************************************************************************************************************************************************************************
changed: [localhost]

TASK [composer : Install Composer Dependencies (Development)] ********************************************************************************************************************************************************************************
skipping: [localhost]

TASK [composer : Install Composer Dependencies (Production)] *********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "composer install --no-dev --optimize-autoloader", "delta": "0:00:03.809699", "end": "2021-02-19 13:31:22.429442", "msg": "non-zero return code", "rc": 1, "start": "2021-02-19 13:31:18.619743", "stderr": "Installing dependencies from lock file\nVerifying lock file contents can be installed on current platform.\nPackage operations: 125 installs, 0 updates, 0 removals\n  - Syncing wikimedia/composer-merge-plugin (dev-feature/composer-v2 a8c5a89) into cache\n    0 [>---------------------------]    0 [>---------------------------]    0 [>---------------------------]  - Installing composer/package-versions-deprecated (1.11.99.1): Extracting archive\n  - Installing wikimedia/composer-merge-plugin (dev-feature/composer-v2 a8c5a89): Cloning a8c5a89c60\n    a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6 is gone (history was rewritten?)\n    Install of wikimedia/composer-merge-plugin failed\n\n
                                                                                                                                             \n  [RuntimeException]
                                                   \n  Failed to execute git checkout 'a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6' -- && git reset --hard 'a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6' --  \n
                                                                                                             \n  fatal: reference is not a tree: a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6
                   \n                                                                                                                                                  \n\ninstall [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]...", "stderr_lines": ["Installing dependencies from lock file", "Verifying lock file contents can be installed on current platform.", "Package operations:
125 installs, 0 updates, 0 removals", "  - Syncing wikimedia/composer-merge-plugin (dev-feature/composer-v2 a8c5a89) into cache", "    0 [>---------------------------]    0 [>---------------------------]    0 [>---------------------------]  - Installing composer/package-versions-deprecated (1.11.99.1): Extracting archive", "  - Installing wikimedia/composer-merge-plugin (dev-feature/composer-v2 a8c5a89): Cloning a8c5a89c60", "    a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6 is gone (history was rewritten?)", "    Install of wikimedia/composer-merge-plugin failed", "", "
    ", "  [RuntimeException]                                                                                                                              ", "  Failed to execute git checkout 'a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6' -- && git reset --hard 'a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6' --  ", "                                                                                                                                                  ", "  fatal: reference is not a tree: a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6                                                                        ", "
                                        ", "", "install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]..."], "stdout": "", "stdout_lines": []}

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
localhost                  : ok=16   changed=7    unreachable=0    failed=1    skipped=53   rescued=0    ignored=0

Screenshots

Device(s):

  • Device:
  • OS:
  • Browser:
  • Version:

Additional context

@aconitumnapellus
Copy link
Contributor Author

Apparently this is an upstream issue when wikimedia/composer-merge-plugin#189 was merged.
Found the following workaround that makes my webui work again:

diff --git a/composer.json b/composer.json
index fd539cc1a..c4f8216b9 100644
--- a/composer.json
+++ b/composer.json
@@ -77,7 +77,7 @@
         "symfony/validator": "^5",
         "theiconic/php-ga-measurement-protocol": "^2.9",
         "voku/portable-utf8": "^5.4",
-        "wikimedia/composer-merge-plugin": "dev-feature/composer-v2",
+        "wikimedia/composer-merge-plugin": "dev-master",
         "zircote/swagger-php": "^3"
     },
     "require-dev": {
diff --git a/composer.lock b/composer.lock
index 7bdb4b7c8..012e591f4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8608,8 +8608,8 @@
             "version": "dev-feature/composer-v2",
             "source": {
                 "type": "git",
-                "url": "https://github.com/mcaskill/composer-merge-plugin.git",
-                "reference": "a8c5a89c6057c6861c79f232ef0b311dc2ec4aa6"
+                "url": "https://github.com/wikimedia/composer-merge-plugin.git",
+                "reference": "a674d4bcd55c9fd72f2149d564b875fb8768ca00"
             },
             "require": {
                 "composer-plugin-api": "^1.1||^2.0",

@Vaalyn Vaalyn added the bug A part of the software's functionality doesn't work as expected. label Feb 19, 2021
@BusterNeece
Copy link
Member

I swear we've fixed this twice already...they're having some trouble upstream with keeping their Git tree clean.

Will take a look and update accordingly.

@BusterNeece BusterNeece added in progress A workaround, temporary or permanent fix is in progress upstream Involves software that is "upstream" from AzuraCast, i.e. broadcasting software or OS software. labels Feb 19, 2021
@BusterNeece
Copy link
Member

I've updated our dependencies to point back to the main branch on the main wikimedia repository, as they've merged in the "Add Composer v2 Support" pull request, so we don't need to do any other silly stuff to get that functionality.

Try updating your installations and let me know if it resolves the issue. We may need to do a special stable release in the near future too just to ensure this is fixed for all users across the board.

@BusterNeece
Copy link
Member

@aconitumnapellus Can you check and verify that the latest version of the Composer package manifest doesn't have this issue?

@aconitumnapellus
Copy link
Contributor Author

aconitumnapellus commented Feb 22, 2021

@aconitumnapellus Can you check and verify that the latest version of the Composer package manifest doesn't have this issue?

I checked out the files i patched to match origin and now when i run "update.sh" i get the following:

Checking for Ansible: install ok installed
Hit:1 http://ch.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://ch.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://ch.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu focal InRelease
Hit:7 http://ch.archive.ubuntu.com/ubuntu focal-security InRelease
Hit:8 http://ppa.launchpad.net/chris-needham/ppa/ubuntu focal InRelease
Hit:9 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Reading package lists... Done
Reading package lists...
Building dependency tree...
Reading state information...
Package python-mysqldb is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-mysqldb' has no installation candidate
Updating AzuraCast (Environment: production, Update revision: 60)
HEAD is now at 50527e35c Merge branch 'master' into stable
remote: Enumerating objects: 148, done.
remote: Counting objects: 100% (148/148), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 159 (delta 72), reused 117 (delta 48), pack-reused 11
Receiving objects: 100% (159/159), 177.06 KiB | 969.00 KiB/s, done.
Resolving deltas: 100% (72/72), completed with 29 local objects.
From https://github.com/AzuraCast/AzuraCast
   50527e35c..6e999513d  stable     -> origin/stable
   648c34856..72cc75b8c  main       -> origin/main
 * [new tag]             0.12.1     -> 0.12.1
Updating 50527e35c..6e999513d
Fast-forward
 .github/ISSUE_TEMPLATE/bug_report.md                                                           |  46 ++++----
 .github/ISSUE_TEMPLATE/config.yml                                                              |  18 ++++
 .github/ISSUE_TEMPLATE/feature_request.md                                                      |  11 --
 .github/workflows/default.yml                                                                  | 156 ++++++++++++++-------------
 CHANGELOG.md                                                                                   |  54 +++++++++-
 CODE_OF_CONDUCT.md                                                                             |   3 +-
 CONTRIBUTING.md                                                                                |  78 ++++++++++----
 Dockerfile                                                                                     |   2 +-
 README.md                                                                                      | 130 ++++++++++++++++-------
 SUPPORT.md                                                                                     |   5 +-
 azuracast.sample.env                                                                           |  12 ---
 composer.json                                                                                  |  14 +--
 composer.lock                                                                                  | 773 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------
 config/assets.php                                                                              |   6 ++
 config/events.php                                                                              |   1 -
 config/forms/settings.php                                                                      |  16 ++-
 config/forms/station.php
 config/routes/stations.php                                                                     |  10 +-
 config/webhooks.php                                                                            |  11 +-
 docker-compose.sample.yml                                                                      | 184 ++++++++++++++++----------------
 docker.sh                                                                                      | 782 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------
 frontend/vue/Dashboard.vue                                                                     | 138 ++++++++++++++----------
 frontend/vue/PublicRadioPlayer.vue                                                             |   7 +-
 frontend/vue/RadioPlayer.vue                                                                   |  42 +++-----
 frontend/vue/SongRequest.vue                                                                   |  65 ++++++++++--
 frontend/vue/StationMedia.vue                                                                  |   4 +-
 frontend/vue/StationProfile.vue                                                                |  40 ++-----
 frontend/vue/StationQueue.vue                                                                  | 114 ++++++++++++++++++++
 frontend/vue/components/DataTable.vue                                                          |   2 +-
 frontend/vue/entity/NowPlaying.js                                                              |  66 ++++++++++++
 frontend/vue/public_radio_player/RequestModal.vue                                              |   7 +-
 frontend/vue/station_media/MediaEditModal.vue                                                  |   6 +-
 frontend/vue/station_media/form/MediaFormCustomFields.vue                                      |  10 +-
 frontend/vue/station_playlists/form/PlaylistFormBasicInfo.vue                                  |   2 +-
 frontend/vue/station_profile/ProfileStreams.vue                                                |  12 +--
 frontend/vue/station_queue/QueueLogsModal.vue                                                  |  53 ++++++++++
 frontend/webpack.config.js                                                                     |   1 +
 install.sh                                                                                     |  37 +++----
 src/Console/Command/MigrateConfigCommand.php                                                   |   4 +
 src/Console/ErrorHandler.php                                                                   |   7 +-
 src/Controller/Api/Stations/Files/BatchAction.php                                              |   2 +-
 src/Controller/Api/Stations/FilesController.php                                                |   2 +-
 src/Controller/Api/Stations/QueueController.php                                                |  31 +++---
 src/Controller/Frontend/PublicPages/PlayerAction.php                                           |  45 +++-----
 src/Controller/Frontend/PublicPages/RequestsAction.php                                         |  19 +++-
 src/Controller/Stations/{EditLiquidsoapConfigController.php => EditLiquidsoapConfigAction.php} |  25 ++---
 src/Controller/Stations/{FilesController.php => FilesAction.php}                               |  24 +----
 src/Controller/Stations/{PlaylistsController.php => PlaylistsAction.php}                       |  13 ++-
 src/Controller/Stations/QueueAction.php                                                        |  22 ++++
 src/Controller/Stations/QueueController.php                                                    |  15 ---
 src/Controller/Stations/{StreamersController.php => StreamersAction.php}                       |  32 ++----
 src/Entity/Api/Station.php                                                                     |  23 ++++
 src/Entity/Api/StationQueueDetailed.php                                                        |   7 ++
 src/Entity/ApiGenerator/StationApiGenerator.php                                                |  16 ++-
 src/Entity/Fixture/Settings.php                                                                |   2 +
 src/Entity/Migration/Version20210203030115.php                                                 |  46 ++++++++
 src/Entity/Migration/Version20210207015534.php                                                 |  30 ++++++
 src/Entity/Repository/SongHistoryRepository.php                                                |  14 +--
 src/Entity/Repository/StationMediaRepository.php                                               |  23 +++-
 src/Entity/Repository/StationQueueRepository.php                                               |  26 ++++-
 src/Entity/Repository/StationRequestRepository.php                                             |   5 +-
 src/Entity/Settings.php                                                                        |  16 +++
 src/Entity/SongHistory.php                                                                     |  10 +-
 src/Entity/StationMount.php                                                                    |   4 -
 src/Entity/StationPlaylist.php                                                                 |   6 --
 src/Entity/StationWebhook.php                                                                  |  26 +++++
 src/Environment.php                                                                            |  13 +--
 src/Event/AbstractBuildMenu.php                                                                |  12 +--
 src/Event/BuildStationMenu.php                                                                 |   6 +-
 src/Event/SendWebhooks.php                                                                     | 101 ------------------
 src/Form/StationCloneForm.php                                                                  |   6 +-
 src/Form/StationForm.php                                                                       |  67 ++++++------
 src/Message/DispatchWebhookMessage.php                                                         |   5 +-
 src/Middleware/Module/Admin.php                                                                |  12 ++-
 src/Middleware/Module/Stations.php                                                             |  12 ++-
 src/Paginator.php                                                                              |   2 +-
 src/Radio/AutoDJ.php                                                                           | 203 ++++++++++++++++++-----------------
 src/Radio/AutoDJ/Queue.php                                                                     | 642 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------
 src/Radio/Backend/Liquidsoap.php                                                               |   9 +-
 src/Radio/Backend/Liquidsoap/ConfigWriter.php                                                  | 238 +++++++++++++++++++++++------------------
 src/Radio/Frontend/Icecast.php                                                                 |  22 +++-
 src/Sync/Task/CheckMediaTask.php                                                               |   2 +-
 src/Sync/Task/NowPlayingTask.php                                                               |  55 ++++++++--
 src/Sync/Task/RunAnalyticsTask.php                                                             |  71 +++++++------
 src/Version.php                                                                                |  10 +-
 src/Webhook/Connector/AbstractConnector.php                                                    |  50 +++++++--
 src/Webhook/Connector/ConnectorInterface.php                                                   |  30 ++++--
 src/Webhook/Connector/Discord.php                                                              |  36 ++++---
 src/Webhook/Connector/Generic.php                                                              |  21 ++--
 src/Webhook/Connector/GoogleAnalytics.php                                                      |  23 ++--
 src/Webhook/Connector/Telegram.php                                                             |  56 ++++++----
 src/Webhook/Connector/TuneIn.php                                                               |  45 ++++----
 src/Webhook/Connector/Twitter.php                                                              |  82 ++++++++-------
 src/Webhook/Dispatcher.php                                                                     | 118 ++++++---------------
 src/Webhook/LocalWebhookHandler.php                                                            |  13 ++-
 templates/frontend/account/login.phtml                                                         |  45 +++++---
 templates/frontend/public/embed.phtml                                                          |  27 +++--
 templates/frontend/public/embedrequests.js.phtml                                               |   1 +
 templates/frontend/public/embedrequests.phtml                                                  |  23 ++--
 templates/frontend/public/index.js.phtml                                                       |   7 +-
 templates/frontend/public/index.phtml                                                          |  22 +++-
 templates/main.phtml                                                                           |   4 +-
 templates/minimal.phtml                                                                        |  20 ++--
 templates/partials/log_help_card.phtml                                                         |  12 ++-
 templates/stations/playlists/edit.js.phtml                                                     |  24 -----
 templates/stations/playlists/edit.phtml                                                        |  13 ---
 templates/stations/playlists/index.js.phtml                                                    |   2 +-
 templates/stations/playlists/index.phtml                                                       |  24 +++--
 templates/stations/playlists/reorder.js.phtml                                                  |  30 ------
 templates/stations/playlists/reorder.phtml                                                     |  52 ---------
 templates/stations/profile/index.js.phtml                                                      |   4 -
 templates/stations/queue/index.js.phtml                                                        |  75 +++----------
 templates/stations/queue/index.phtml                                                           |  30 +-----
 templates/stations/streamers/index.phtml                                                       |  44 +++++---
 tests/_support/_generated/FunctionalTesterActions.php                                          | 116 ++++++++++++--------
 tests/_support/_generated/UnitTesterActions.php                                                |  74 ++++++++++++-
 update.sh                                                                                      |  27 +++--
 util/ansible/roles/azuracast-db-install/tasks/main.yml                                         |   2 +-
 web/static/api/openapi.yml                                                                     |  58 ++++++----
 120 files changed, 3489 insertions(+), 2666 deletions(-)
 create mode 100644 .github/ISSUE_TEMPLATE/config.yml
 delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md
 create mode 100644 frontend/vue/StationQueue.vue
 create mode 100644 frontend/vue/entity/NowPlaying.js
 create mode 100644 frontend/vue/station_queue/QueueLogsModal.vue
 rename src/Controller/Stations/{EditLiquidsoapConfigController.php => EditLiquidsoapConfigAction.php} (82%)
 rename src/Controller/Stations/{FilesController.php => FilesAction.php} (73%)
 rename src/Controller/Stations/{PlaylistsController.php => PlaylistsAction.php} (63%)
 create mode 100644 src/Controller/Stations/QueueAction.php
 delete mode 100644 src/Controller/Stations/QueueController.php
 rename src/Controller/Stations/{StreamersController.php => StreamersAction.php} (71%)
 create mode 100644 src/Entity/Migration/Version20210203030115.php
 create mode 100644 src/Entity/Migration/Version20210207015534.php
 delete mode 100644 src/Event/SendWebhooks.php
 delete mode 100644 templates/stations/playlists/edit.js.phtml
 delete mode 100644 templates/stations/playlists/edit.phtml
 delete mode 100644 templates/stations/playlists/reorder.js.phtml
 delete mode 100644 templates/stations/playlists/reorder.phtml
ERROR! Unexpected Exception, this is probably a bug: cannot import name 'CachePluginAdjudicator' from 'ansible.plugins.cache' (unknown location)
to see the full traceback, use -vvv

This might be because of me fucking around to find the workaround mentioned above.
I try a full update.sh
This: ansible-collections/community.kubernetes#135 mentions that maybe my ansible version is "outdated".
I upgraded my ansible version to ansible 2.9.8, which fixed this issue. Its currently running.

Did run through successfully.

@BusterNeece
Copy link
Member

@aconitumnapellus That's likely caused by something else. You may be able to get around that by manually updating ansible via apt-get update && apt-get install ansible, but that's beyond the scope of our support provided here. I'm closing this issue as resolved for now.

@github-actions
Copy link

This issue has not been updated in over a year, so it is being closed for further discussion. If you are experiencing a similar issue, please create a new issue. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A part of the software's functionality doesn't work as expected. in progress A workaround, temporary or permanent fix is in progress upstream Involves software that is "upstream" from AzuraCast, i.e. broadcasting software or OS software.
Projects
None yet
Development

No branches or pull requests

3 participants