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

Debian Improvements #698

Closed
wants to merge 37 commits into from
Closed

Debian Improvements #698

wants to merge 37 commits into from

Conversation

Anuskuss
Copy link
Contributor

@Anuskuss Anuskuss commented Nov 6, 2024

Disclaimer: I'm not a Debian maintainer and I'm sure there are some edge cases not handled by the way I do the pre/post scripts (for example I call systemctl directly instead of deb-systemd-invoke) but this works for me. I'm sure this can be improved upon once submitted to/picked up from the Debian repo.

Summary by CodeRabbit

  • New Features

    • Introduced a new configuration file structure for the peerbanhelper package, enhancing organization with a consolidated configuration file and a separate profile settings file.
    • Added a new dependency for user management during installation.
  • Bug Fixes

    • Improved error handling and user creation logic in the installation script.
  • Documentation

    • Updated service configuration to enhance logging capabilities and specify new parameters.
  • Chores

    • Added scripts for proper handling of service management during installation and uninstallation processes.

Copy link
Contributor

coderabbitai bot commented Nov 6, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request introduces several modifications to the peerbanhelper package, including the restructuring of configuration file paths and the addition of a new profile configuration file. It also updates the control file to include a new dependency, enhances the post-installation script for user management, and introduces new pre-removal and post-removal scripts to handle service management and configuration file cleanup. Additionally, the systemd service configuration is updated to improve logging.

Changes

File Path Change Summary
pkg/deb/DEBIAN/conffiles Configuration file paths updated; original file moved from /data/config.yml to /config/config.yml and new file /config/profile.yml added.
pkg/deb/DEBIAN/control Added Pre-Depends: adduser; updated formatting of Depends field (no content change).
pkg/deb/DEBIAN/postinst Updated script to improve user creation logic and service management; removed directory creation command.
pkg/deb/DEBIAN/postrm New script to handle configuration file removal during uninstallation; checks for "purge" argument.
pkg/deb/DEBIAN/prerm New script to stop the peerbanhelper.service before removal; includes error handling.
pkg/deb/usr/lib/systemd/system/peerbanhelper.service Updated ExecStart command to include -Dpbh.log.level=WARN; removed StandardOutput directive.
pkg/deb/etc/peerbanhelper/profile.yml Added a newline at the end of the file; no changes to existing settings.

Possibly related PRs

  • Add real deb #484: The changes in the main PR regarding the configuration files for the peerbanhelper package are directly related to the modifications made in the pkg/deb/DEBIAN/conffiles file in PR Add real deb #484, which also involves the configuration structure for the same package.
  • Add freebsd pkg #539: The introduction of the /etc/peerbanhelper/ directory in PR Add freebsd pkg #539 aligns with the changes in the main PR that involve moving configuration files to a new directory structure, indicating a shared focus on organizing configuration files for the peerbanhelper package.

🐰 In the burrow, changes bloom,
Configuration files make more room.
With scripts to manage, and logs to see,
PeerBanHelper hops with glee!
New paths and users, all in line,
A tidy package, oh so fine! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Anuskuss Anuskuss mentioned this pull request Nov 6, 2024
4 tasks
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Outside diff range and nitpick comments (4)
pkg/deb/DEBIAN/postrm (1)

1-2: Consider using debhelper instead of direct systemctl calls

As mentioned in the PR objectives, the implementation directly uses systemctl. Consider using deb-systemd-invoke for better Debian compliance.

For proper Debian integration:

  1. Use deb-systemd-helper for systemd service management
  2. Use deb-systemd-invoke instead of direct systemctl calls
  3. Consider implementing this script using debhelper's dh_installdeb

Would you like assistance in implementing these improvements?

pkg/deb/DEBIAN/postinst (2)

1-1: Enhance script robustness with additional shell options.

Add -u flag to catch undefined variables and set POSIX mode explicitly.

-#!/bin/sh -e
+#!/bin/sh -eu
+set -o posix

1-5: Consider additional Debian packaging best practices.

To improve maintainability and reliability:

  1. Add proper maintainer script sections (configure, abort-upgrade, etc.)
  2. Use set -e in combination with proper error trapping
  3. Consider using debhelper scripts where possible
  4. Add logging to help diagnose installation issues

Example structure:

#!/bin/sh
set -e

# Source debconf library
. /usr/share/debconf/confmodule

case "$1" in
    configure)
        # Your existing code here, properly structured
        ;;
    abort-upgrade|abort-remove|abort-deconfigure)
        ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
        ;;
esac

# Optional: use debhelper
#DEBHELPER#

exit 0
pkg/deb/usr/lib/systemd/system/peerbanhelper.service (1)

5-9: Add resource limits to prevent service exhaustion.

The service should have explicit resource limits to prevent system resource exhaustion:

 [Service]
 User=peerbanhelper
 WorkingDirectory=/etc/peerbanhelper
+LimitNOFILE=65535
+MemoryMax=1G
+TasksMax=4096
 ExecStart=/usr/bin/java -Dpbh.release=debian -Dpbh.datadir=/etc/peerbanhelper -Dpbh.log.level=WARN -Xmx512M -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -jar /usr/lib/peerbanhelper/PeerBanHelper.jar
 Restart=on-failure
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8411fbb and 5b495ca.

📒 Files selected for processing (6)
  • pkg/deb/DEBIAN/conffiles (1 hunks)
  • pkg/deb/DEBIAN/control (1 hunks)
  • pkg/deb/DEBIAN/postinst (1 hunks)
  • pkg/deb/DEBIAN/postrm (1 hunks)
  • pkg/deb/DEBIAN/prerm (1 hunks)
  • pkg/deb/usr/lib/systemd/system/peerbanhelper.service (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • pkg/deb/DEBIAN/conffiles
  • pkg/deb/DEBIAN/prerm
🔇 Additional comments (3)
pkg/deb/DEBIAN/postrm (1)

1-2: Verify configuration file handling

Let's verify that the configuration files mentioned in the conffiles are properly handled during package removal.

✅ Verification successful

Configuration files are properly handled during package removal

The verification shows that:

  • The conffiles correctly lists the configuration files: /etc/peerbanhelper/config/config.yml and /etc/peerbanhelper/config/profile.yml
  • The postrm script correctly handles configuration files by:
    • In purge mode: Removes entire /etc/peerbanhelper directory
    • In remove mode: Preserves config and scripts directories while removing everything else
  • The configuration files are properly placed in the package structure at /etc/peerbanhelper/data/
  • The maintainer scripts follow the Debian policy for configuration file handling

The implementation ensures proper preservation of user configurations during package removal while allowing complete cleanup during purge operations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check configuration files and their handling

# Test 1: Check if conffiles exists and contains the config paths
echo "Checking conffiles entries:"
if [ -f "pkg/deb/DEBIAN/conffiles" ]; then
    cat pkg/deb/DEBIAN/conffiles
else
    echo "conffiles not found!"
fi

# Test 2: Check for any additional configuration files that might need protection
echo -e "\nChecking for potential config files:"
fd -t f "\.yml$|\.conf$|\.config$" "pkg/deb"

Length of output: 427


Script:

#!/bin/bash
# Let's verify the postrm script behavior against conffiles

# Check the content of the config files to understand their structure
echo "Content of config files:"
cat pkg/deb/etc/peerbanhelper/data/config.yml || echo "Cannot read config.yml"
cat pkg/deb/etc/peerbanhelper/data/profile.yml || echo "Cannot read profile.yml"

# Check if there are any other files in the config directory structure
echo -e "\nDirectory structure:"
find pkg/deb/etc/peerbanhelper -type f -o -type d

# Check if there are any other maintainer scripts that might interact with these configs
echo -e "\nOther maintainer scripts:"
find pkg/deb/DEBIAN -type f -name "pre*" -o -name "post*" | while read -r file; do
    echo "=== $file ==="
    cat "$file" || echo "Cannot read $file"
done

Length of output: 29241

pkg/deb/DEBIAN/control (2)

4-4: LGTM: Dependencies are correctly specified.

The Depends line maintains the required dependencies with proper version constraints.


3-3: LGTM: Pre-Depends on adduser is appropriate.

The addition of Pre-Depends: adduser is correct as it ensures the required user management tools are available before package configuration.

Let's verify the user creation in the postinst script:

✅ Verification successful

Pre-Depends on adduser is correctly used and verified

The Pre-Depends: adduser is justified as the postinst script creates a system user using adduser command. This ensures the required user management tools are available before package configuration, which is essential for:

  • Creating the system user 'peerbanhelper'
  • Setting up proper ownership of /etc/peerbanhelper directory
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if postinst script exists and uses adduser
if [ -f "pkg/deb/DEBIAN/postinst" ]; then
    echo "Checking postinst for user creation..."
    grep -A 5 "adduser\|useradd" pkg/deb/DEBIAN/postinst
fi

Length of output: 408

pkg/deb/DEBIAN/postrm Outdated Show resolved Hide resolved
pkg/deb/DEBIAN/postinst Outdated Show resolved Hide resolved
pkg/deb/DEBIAN/postinst Outdated Show resolved Hide resolved
pkg/deb/DEBIAN/postinst Outdated Show resolved Hide resolved
pkg/deb/usr/lib/systemd/system/peerbanhelper.service Outdated Show resolved Hide resolved
pkg/deb/usr/lib/systemd/system/peerbanhelper.service Outdated Show resolved Hide resolved
@Anuskuss
Copy link
Contributor Author

Anuskuss commented Nov 6, 2024

The bot is pretty cool but I think I'm going to ignore all of the suggestions. The last suggestion (security hardening) is of course useful but is generally not done for other Debian packages and would require some futher testing. Feel free to add them yourself via systemctl edit peerbanhelper though.

@Ghost-chu Ghost-chu requested a review from Gaojianli November 7, 2024 04:27
@Ghost-chu Ghost-chu added the enhancement 功能增强 label Nov 7, 2024
@Ghost-chu Ghost-chu requested a review from paulzzh November 7, 2024 04:27
pkg/deb/usr/lib/systemd/system/peerbanhelper.service Outdated Show resolved Hide resolved
pkg/deb/DEBIAN/postinst Outdated Show resolved Hide resolved
Ghost-chu added a commit that referenced this pull request Nov 7, 2024
@Anuskuss
Copy link
Contributor Author

Anuskuss commented Nov 7, 2024

I implemented the suggested changes but I haven't actually tested them because I'm still using v7.1.1. Also do you want me to research how to deal with the config changes or is it okay to break existing installations? How's the policy on that?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fbe874e and 3e9c270.

📒 Files selected for processing (4)
  • pkg/deb/DEBIAN/conffiles (1 hunks)
  • pkg/deb/DEBIAN/postinst (1 hunks)
  • pkg/deb/etc/peerbanhelper/profile.yml (1 hunks)
  • pkg/deb/usr/lib/systemd/system/peerbanhelper.service (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • pkg/deb/etc/peerbanhelper/profile.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/deb/DEBIAN/conffiles
  • pkg/deb/DEBIAN/postinst
🔇 Additional comments (1)
pkg/deb/usr/lib/systemd/system/peerbanhelper.service (1)

8-8: Configure proper logging for the service.

The service lacks proper systemd logging configuration, which could affect log collection and management.

The previous suggestion about adding proper logging configuration is still valid:

+StandardOutput=journal
+StandardError=journal
+SyslogIdentifier=peerbanhelper

pkg/deb/DEBIAN/postinst Outdated Show resolved Hide resolved
pkg/deb/usr/lib/systemd/system/peerbanhelper.service Outdated Show resolved Hide resolved
@Gaojianli
Copy link
Member

I implemented the suggested changes but I haven't actually tested them because I'm still using v7.1.1. Also do you want me to research how to deal with the config changes or is it okay to break existing installations? How's the policy on that?

For migration we may check existing config in the post-install script and move them. The log change will be deployed in next patch, today night or tomorrow

@Ghost-chu
Copy link
Collaborator

Ghost-chu commented Nov 7, 2024

do nothing but

echo "To start peerbanhelper, please run 'systemctl start peerbanhelper.service'"
echo "To auto-start, please run 'systemctl enable peerbanhelper.service'"

@Gaojianli
I think the first launch is fine, as long as the user is able to turn it off.

I reject this suggestion: #698 (comment)

@Gaojianli
Copy link
Member

@Gaojianli I think the first launch is fine, as long as the user is able to turn it off.

I reject this suggestion: #698 (comment)

Well, systemctl restart peerbanhelper.service is accepted for me

@Ghost-chu
Copy link
Collaborator

@Gaojianli I think the first launch is fine, as long as the user is able to turn it off.
I reject this suggestion: #698 (comment)

Well, systemctl restart peerbanhelper.service is accepted for me

@Gaojianli I think the first launch is fine, as long as the user is able to turn it off.
I reject this suggestion: #698 (comment)

Well, systemctl restart peerbanhelper.service is accepted for me

@Gaojianli
I think autostart is great, geez let's go to IM and argue and not keep sending tons of emails.

@Gaojianli
Copy link
Member

@Gaojianli I think the first launch is fine, as long as the user is able to turn it off.
I reject this suggestion: #698 (comment)

Well, systemctl restart peerbanhelper.service is accepted for me

@Gaojianli I think the first launch is fine, as long as the user is able to turn it off.
I reject this suggestion: #698 (comment)

Well, systemctl restart peerbanhelper.service is accepted for me

@Gaojianli I think autostart is great, geez let's go to IM and argue and not keep sending tons of emails.

SERVICE="peerbanhelper.service"
INSTALLED_FLAG="/etc/peerbanhelper/.installed"
if [ -e $INSTALLED_FLAG ]; then
    # update
    if systemctl is-active --quiet "$SERVICE" > /dev/null 2>&1; then
        echo "$SERVICE is already running. Restarting the service."
        systemctl restart "$SERVICE"
    fi
else
    # first install
    systemctl enable --now $SERVICE
    touch $INSTALLED_FLAG
fi

@Gaojianli Gaojianli mentioned this pull request Nov 8, 2024
4 tasks
@Gaojianli Gaojianli changed the base branch from master to dev November 8, 2024 04:51
@Gaojianli Gaojianli requested review from a team as code owners November 8, 2024 04:51
@Anuskuss
Copy link
Contributor Author

Anuskuss commented Nov 8, 2024

I fixed some of the things you mentioned (e.g. /var/lib instead of /opt) and

  • There's an migration path now which puts the old layout into their correct location (hopefully I didn't screw this up)
  • I've realize now that it doesn't even make sense to autostart PBH because if the user doesn't even autostart their torrent client PBH will just waste resources. So the user has to enable it themselves (perferrably with something like BindsTo=transmission-daemon.service).
  • The service will still start after installation/upgrade because I think that's what the user excepts. I can also start it only if it was active before upgrading but that would require some state tracking as the service gets stopped in prerm and I need to communicate that to postinst.

Any other suggestions?

@Gaojianli Gaojianli mentioned this pull request Nov 8, 2024
11 tasks
@Anuskuss
Copy link
Contributor Author

Anuskuss commented Nov 8, 2024

Hm there's a java.io.FileNotFoundException: data/logs/latest.log (No such file or directory) error now. Can you drop that code completely? The data directory contains duplicate YAML configs and a duplicate log so I figured I'd just delete that directory completely.

@Ghost-chu
Copy link
Collaborator

Hm there's a error now. Can you drop that code completely? The directory contains duplicate YAML configs and a duplicate log so I figured I'd just delete that directory completely.java.io.FileNotFoundException: data/logs/latest.log (No such file or directory)``data

Could you provide a copy of the exception stacktrace?

@Anuskuss
Copy link
Contributor Author

Anuskuss commented Nov 8, 2024

Just delete the data directory and see for yourself. Because the working directory is now /usr/lib/peerbanhelper (no write access) it can't create it. But even if I changed it to /var/lib/peerbanhelper what's the point? It will literally just create a logs directory in there with an empty latest.log. Just remove that code completely.

Log
java[627895]: |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/usr/lib/peerbanhelper/data/logs/latest.log]
java[627895]: |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(data/logs/latest.log,true) call failed. java.io.FileNotFoundException: data/logs/latest.log (No such file or directory)
java[627895]:         at java.io.FileNotFoundException: data/logs/latest.log (No such file or directory)
java[627895]:         at         at java.base/java.io.FileOutputStream.open0(Native Method)
java[627895]:         at         at java.base/java.io.FileOutputStream.open(Unknown Source)
java[627895]:         at         at java.base/java.io.FileOutputStream.<init>(Unknown Source)
java[627895]:         at         at ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:26)
java[627895]:         at         at ch.qos.logback.core.FileAppender.openFile(FileAppender.java:206)
java[627895]:         at         at ch.qos.logback.core.FileAppender.start(FileAppender.java:126)
java[627895]:         at         at ch.qos.logback.core.rolling.RollingFileAppender.start(RollingFileAppender.java:104)
java[627895]:         at         at ch.qos.logback.core.model.processor.AppenderModelHandler.postHandle(AppenderModelHandler.java:84)
java[627895]:         at         at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:257)
java[627895]:         at         at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:253)
java[627895]:         at         at ch.qos.logback.core.model.processor.DefaultProcessor.traversalLoop(DefaultProcessor.java:90)
java[627895]:         at         at ch.qos.logback.core.model.processor.DefaultProcessor.process(DefaultProcessor.java:106)
java[627895]:         at         at ch.qos.logback.core.joran.GenericXMLConfigurator.processModel(GenericXMLConfigurator.java:222)
java[627895]:         at         at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:178)
java[627895]:         at         at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:123)
java[627895]:         at         at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:66)
java[627895]:         at         at ch.qos.logback.classic.util.DefaultJoranConfigurator.configureByResource(DefaultJoranConfigurator.java:68)
java[627895]:         at         at ch.qos.logback.classic.util.DefaultJoranConfigurator.configure(DefaultJoranConfigurator.java:35)
java[627895]:         at         at ch.qos.logback.classic.util.ContextInitializer.invokeConfigure(ContextInitializer.java:128)
java[627895]:         at         at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:103)
java[627895]:         at         at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:66)
java[627895]:         at         at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:52)
java[627895]:         at         at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
java[627895]:         at         at org.slf4j.LoggerFactory.bind(LoggerFactory.java:199)
java[627895]:         at         at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:186)
java[627895]:         at         at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:496)
java[627895]:         at         at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:482)
java[627895]:         at         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:431)
java[627895]:         at         at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:457)
java[627895]:         at         at com.ghostchu.peerbanhelper.Main.<clinit>(Main.java:43)
java[627895]:         at         at com.ghostchu.peerbanhelper.MainJumpLoader.main(MainJumpLoader.java:17)

I'm also thinking about adding SuccessExitStatus=143 (I'm already using that locally) because the unit always returns that exit code for seemingly no reason. Unless you find the root cause I think it wouldn't hurt.

@Anuskuss
Copy link
Contributor Author

PR looks good and ready for merge.

Have you actually tested this? Because for the migration path I only did tests with minimal configuration and I don't know if I missed something. After running it for a couple of days now I see that there are .log.gz files in logs and I previously only copied latest.log (now I even delete the directory completely) and that definitely needs to be fixed. As for the normal install/upgrade I only did small changes anyway so I think that's good to go.

I need take a look into that exception

I still want to remove data so I guess the user has to live with that exception for now. Doesn't seem to be that serious anyway.

@Gaojianli
Copy link
Member

LGTM, once you rebase the target branch, this pr can be merged

@Anuskuss Anuskuss mentioned this pull request Nov 14, 2024
@Anuskuss
Copy link
Contributor Author

Resubmitted as #732.

@Anuskuss Anuskuss closed this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 功能增强 priority: medium 中优先级
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants