-
Notifications
You must be signed in to change notification settings - Fork 321
debug disk space #1116
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
debug disk space #1116
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds debug commands to Azure Pipeline build templates to diagnose disk space issues when package builds fail. The changes wrap the dpkg-buildpackage commands with error handling that displays disk usage statistics before exiting.
- Adds disk usage debugging to three build pipeline templates
- Displays directory sizes for key system directories when builds fail
- Filters output to show gigabyte-sized directories for quick diagnosis
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .azure-pipelines/build-template.yml | Adds disk space debug output on build failure for sonic-swss-common compilation with coverage |
| .azure-pipelines/build-swss-template.yml | Adds disk space debug output on build failure for sonic-swss compilation |
| .azure-pipelines/build-sairedis-template.yml | Adds disk space debug output on build failure for sairedis package build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rm ../*.deb || true | ||
| ./autogen.sh | ||
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) | ||
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1} |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before closing brace. The shell syntax requires a space or semicolon before the closing brace in command groups. This should be exit 1 } or exit 1; }.
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1} | |
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1 } |
.azure-pipelines/build-template.yml
Outdated
| rm ../*.deb || true | ||
| ./autogen.sh | ||
| DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' DEB_CXXFLAGS_APPEND="-coverage -fprofile-abs-path" DEB_LDFLAGS_APPEND="-coverage -fprofile-abs-path" dpkg-buildpackage -Pnopython2 -us -uc -b -j$(nproc) | ||
| DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' DEB_CXXFLAGS_APPEND="-coverage -fprofile-abs-path" DEB_LDFLAGS_APPEND="-coverage -fprofile-abs-path" dpkg-buildpackage -Pnopython2 -us -uc -b -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1 } |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grep G command will fail if no gigabyte-sized directories are found, which could mask the original build failure. Consider using grep G || true to ensure the debug output always completes, or remove the grep filter entirely to show all directory sizes.
| DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' DEB_CXXFLAGS_APPEND="-coverage -fprofile-abs-path" DEB_LDFLAGS_APPEND="-coverage -fprofile-abs-path" dpkg-buildpackage -Pnopython2 -us -uc -b -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1 } | |
| DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' DEB_CXXFLAGS_APPEND="-coverage -fprofile-abs-path" DEB_LDFLAGS_APPEND="-coverage -fprofile-abs-path" dpkg-buildpackage -Pnopython2 -us -uc -b -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G || true ; exit 1 } |
| rm ../*.deb || true | ||
| ./autogen.sh | ||
| dpkg-buildpackage -us -uc -b -j$(nproc) | ||
| dpkg-buildpackage -us -uc -b -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1 } |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grep G command will fail if no gigabyte-sized directories are found, which could mask the original build failure. Consider using grep G || true to ensure the debug output always completes, or remove the grep filter entirely to show all directory sizes.
| dpkg-buildpackage -us -uc -b -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1 } | |
| dpkg-buildpackage -us -uc -b -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G || true ; exit 1 } |
| rm ../*.deb || true | ||
| ./autogen.sh | ||
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) | ||
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1} |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grep G command will fail if no gigabyte-sized directories are found, which could mask the original build failure. Consider using grep G || true to ensure the debug output always completes, or remove the grep filter entirely to show all directory sizes.
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G ; exit 1} | |
| DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -b -us -uc -Psyncd,vs,nopython2 -j$(nproc) || { sudo du -sh /bin /lib /run /var /usr /home; sudo du -sh /var/lib/* /var/log | grep G || true ; exit 1} |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
No description provided.