【发布时间】:2020-10-21 21:29:19
【问题描述】:
简介
您好,我在 Azure 应用服务上部署 Python-Flask 应用程序已有数月时间。
今天我在 Microsoft DevOps 上运行管道时收到以下错误消息:
错误:由于 EnvironmentError 无法安装软件包:[Errno 28] 设备上没有剩余空间:'/tmp/8d876019152941b/antenv/lib/python3.8/site-packages/numpy-1.18.1 .dist-info'
我在存储在同一计划中的其他应用程序上遇到错误。我的所有应用都无法再更新了
我做了什么
我创建了一个新应用并部署了相同的代码。 我得到了同样的错误:
从以前的 zip 部署中清理临时文件夹并将推送的 zip 文件 /tmp/zipdeploy/REDACTED.zip (246.59 MB) 提取到 /tmp/zipdeploy/extracted
设备上没有剩余空间
##[错误]未能将 Web 包部署到应用服务。
计划规定我的阈值配额是 10 Gb,我使用了 936Mb 或 9% 的配额!
通过 Kundu Bash 使用“df-h”
> Filesystem Size Used Avail Use% Mounted on
> none 29G 27G 0 100% /
> tmpfs 64M 0 64M 0% /dev
> tmpfs 953M 0 953M 0% /sys/fs/cgroup
> shm 62M 0 62M 0% /dev/shm
> //REDACTED/ 1000G 9.7G 991G 1% /home
> /dev/sda1 27G 8.6G 18G 34% /appsvctmp
> /dev/loop6p1 29G 27G 0 100% /etc/hosts
> udev 920M 0 920M 0% /dev/tty
> tmpfs 953M 0 953M 0% /proc/acpi
> tmpfs 953M 0 953M 0% /proc/scsi
> tmpfs 953M 0 953M 0% /sys/firmware
问题
我应该怎么做才能再次工作?
我无法访问 /dev/loop6p1 目录(它是什么?)并删除文件
Azure 管道日志
> 2020-10-21 ##[section]Starting: Deploy Azure Web App : www.alt-f1.be
> 2020-10-21 ==============================================================================
> 2020-10-21 Task : Azure Web App
> 2020-10-21 Description : Deploy an Azure Web App for Linux or Windows
> 2020-10-21 Version : 1.168.3
> 2020-10-21 Author : Microsoft Corporation
> 2020-10-21 Help : https://aka.ms/azurewebapptroubleshooting
> 2020-10-21 ==============================================================================
> 2020-10-21 Got service connection details for Azure App Service:'www.alt-f1.be'
> 2020-10-21 Package deployment using ZIP Deploy initiated.
> 2020-10-21 Updating submodules.
> 2020-10-21 Preparing deployment for commit id '1ea14e5515'.
> 2020-10-21 Repository path is /tmp/zipdeploy/extracted
> 2020-10-21 Running oryx build...
> 2020-10-21 Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.8 -i /tmp/8d876019152941b -p compress_virtualenv=tar-gz -p virtualenv_name=antenv --log-file /tmp/build-debug.log
> 2020-10-21 Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
> 2020-10-21 You can report issues at https://github.com/Microsoft/Oryx/issues
> 2020-10-21
> 2020-10-21 Oryx Version: 0.2.20200917.1, Commit: 59deb778658a124cb74ea8e2c8f39fa87abcc9d9, ReleaseTagName: 20200917.1
> 2020-10-21
> 2020-10-21 Build Operation ID: |18pOsx/PQ8Y=.d0555319_
> 2020-10-21 Repository Commit : 1ea14e5515974a80bdcdc28eac749d4f
> 2020-10-21
> 2020-10-21 Detecting platforms...
> 2020-10-21 Detected following platforms:
> 2020-10-21 nodejs: 12.18.3
> 2020-10-21 python: 3.8.5
> 2020-10-21
> 2020-10-21 Using intermediate directory '/tmp/8d876019152941b'.
> 2020-10-21
> 2020-10-21 Copying files to the intermediate directory...
> 2020-10-21 Done in 6 sec(s).
> 2020-10-21
> 2020-10-21 Source directory : /tmp/8d876019152941b
> 2020-10-21 Destination directory: /home/site/wwwroot
> 2020-10-21
> 2020-10-21 Python Version: /opt/python/3.8.5/bin/python3.8
> 2020-10-21 Python Virtual Environment: antenv
> 2020-10-21 Creating virtual environment...
> 2020-10-21 Activating virtual environment...
> 2020-10-21 Running pip install...
> 2020-10-21 [20:41:33+0000] Collecting altf1be_helpers==2.1.4
> 2020-10-21 [20:41:33+0000] Downloading altf1be_helpers-2.1.4-py2.py3-none-any.whl (14 kB)
...
> 2020-10-21 [20:44:13+0000] Installing collected packages: numpy, six, python-dateutil, pytz, pandas, certifi, urllib3, idna, chardet, requests, isodate, oauthlib, requests-oauthlib, msrest, azure-core, pycparser, cffi, cryptography, azure-storage-blob, Unidecode, altf1be-helpers, attrs, Babel, pyparsing, packaging, > webencodings, bleach, cachelib, click, dash-core-components, dash-html-components, dash-table, MarkupSafe, Jinja2, Werkzeug, itsdangerous, Flask, brotli, Flask-Compress, retrying, plotly, dash-renderer, future, dash, docopt, docutils, Flask-Babel, Flask-Session, SQLAlchemy, Flask-SQLAlchemy, gunicorn, zipp, importlib-metadata, jeepney, > SecretStorage, keyring, more-itertools, yarg, pipreqs, pkginfo, pluggy, py, Pygments, pyodbc, pyopenssl, wcwidth, pytest, python-dotenv, readme-renderer, requests-toolbelt, starkbank-ecdsa, python-http-client, sendgrid, tqdm, twine, WTForms, xlrd, XlsxWriter
> 2020-10-21 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/8d876019152941b/antenv/lib/python3.8/site-packages/numpy-1.18.1.dist-info'
> 2020-10-21
> 2020-10-21 WARNING: You are using pip version 20.1.1; however, version 20.2.4 is available.
> 2020-10-21 You should consider upgrading via the '/tmp/8d876019152941b/antenv/bin/python -m pip install --upgrade pip' command.
> 2020-10-21 ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device: '/tmp/8d876019152941b/antenv/lib/python3.8/site-packages/numpy-1.18.1.dist-info'\n\nWARNING: You are using pip version 20.1.1; however, version 20.2.4 is available.\nYou should consider upgrading via the '/tmp/> 8d876019152941b/antenv/bin/python -m pip install --upgrade pip' command.\n/opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.8 -i /tmp/8d876019152941b -p compress_virtualenv=tar-gz -p virtualenv_name=antenv --log-file /tmp/build-debug.log
> 2020-10-21 ##[error]Failed to deploy web package to App Service.
> 2020-10-21 ##[error]To debug further please check Kudu stack trace URL : https://$www.alt-f1.be:***@www.alt-f1.be.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace
> 2020-10-21 ##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
> 2020-10-21 Successfully updated deployment History at https://www.alt-f1.be.scm.azurewebsites.net/api/deployments/2571603313079929
> 2020-10-21 App Service Application URL: https://www.alt-f1.be.azurewebsites.net
> 2020-10-21 ##[section]Finishing: Deploy Azure Web App : www.alt-f1.be
结论
我的计划完全被阻止了。我无法再部署任何版本的代码了。
【问题讨论】:
-
您使用的是哪一层?是 Windows 还是 Linux 计划?
-
我在你的部署日志中看到Running pip install,这让我有点困惑,可能我对python不太了解。那么您介意分享一下您的发布管道是如何配置的吗?
-
@KrzysztofMadej 我使用 B1 计划
-
@LeoLiu-MSFT 运行 pip install 就像运行 Nuget :您需要安装依赖项,否则应用程序会严重崩溃;-)
-
@Abdelkrim,Microsoft 托管的代理为您的源和构建输出提供 10 GB 的存储空间 -docs.microsoft.com/en-us/azure/devops/pipelines/agents/… Azure 应用服务计划下的所有 WebApp 共享资源。
标签: azure-devops azure-web-app-service azure-pipelines-release-pipeline azure-app-service-plans