[Touch-packages] [Bug 1980991] [NEW] /usr/sbin/on_ac_power incorrectly reporting ac power status
Public bug reported: Good afternoon, folks. I believe I discovered a bug in the /usr/sbin/on_ac_power script. I have a Dell OptiPlex 5090 host that has an entry in /sys/class/power_supply for "ucsi-source-psy-USBC000:001". I believe this is the USB-C power delivery port on the front of the chassis. The issue I'm encountering is that /usr/sbin/on_ac_power is exiting with code 1 which states: (1 (false) if not on AC power) when that isn't the case. This looks to be because of the ucsi-source-psy-USBC000:001 entry reporting the "online" status as 0, presumably because nothing is currently connected to that USB-C port. This causes /usr/sbin/on_ac_power to incorrectly report that the machine isn't connected to AC power and causes other utilities like unattended- upgrades to quit when using the default configuration since it believes the machine isn't connected to AC power. There is a workaround with unattended-upgrades where you can specify it to run regardless of if AC power is connected, but as more and more chassis implement power-delivery USB-C ports I foresee this becoming more of an issue. I'm not sure if it's anything to look into, but I figured I would share my findings. Please let me know if you have any questions or if I can provide any additional information, troubleshooting, or testing. Thanks! -Kevin ** Affects: powermgmt-base (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to powermgmt-base in Ubuntu. https://bugs.launchpad.net/bugs/1980991 Title: /usr/sbin/on_ac_power incorrectly reporting ac power status Status in powermgmt-base package in Ubuntu: New Bug description: Good afternoon, folks. I believe I discovered a bug in the /usr/sbin/on_ac_power script. I have a Dell OptiPlex 5090 host that has an entry in /sys/class/power_supply for "ucsi-source-psy-USBC000:001". I believe this is the USB-C power delivery port on the front of the chassis. The issue I'm encountering is that /usr/sbin/on_ac_power is exiting with code 1 which states: (1 (false) if not on AC power) when that isn't the case. This looks to be because of the ucsi-source-psy-USBC000:001 entry reporting the "online" status as 0, presumably because nothing is currently connected to that USB-C port. This causes /usr/sbin/on_ac_power to incorrectly report that the machine isn't connected to AC power and causes other utilities like unattended-upgrades to quit when using the default configuration since it believes the machine isn't connected to AC power. There is a workaround with unattended-upgrades where you can specify it to run regardless of if AC power is connected, but as more and more chassis implement power-delivery USB-C ports I foresee this becoming more of an issue. I'm not sure if it's anything to look into, but I figured I would share my findings. Please let me know if you have any questions or if I can provide any additional information, troubleshooting, or testing. Thanks! -Kevin To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/powermgmt-base/+bug/1980991/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1951018] Re: No ability to discern IPv4 vs IPv6 rules through Python
I now realize that I may have submitted this bug to the wrong location. Should I submit this to the UFW source site (https://launchpad.net/ufw) or is it alright to keep it here? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ufw in Ubuntu. https://bugs.launchpad.net/bugs/1951018 Title: No ability to discern IPv4 vs IPv6 rules through Python Status in ufw package in Ubuntu: New Bug description: Version: ufw 0.36 Ubuntu Version: 20.04.3 LTS There doesn't appear to be a Python method for accessing IPv4 and IPv6 rules in a distinguishable manner. In the source code (root/src/backend.py) there is an object that stores IPv4 and IPv6 rules in separate lists. Those lists are then accessed with the following method: def get_rules(self): '''Return list of all rules''' return self.rules + self.rules6 The issue with this is that the returned list doesn't contain an indication of what IP version each item corresponds to and would display something like the following. 1 allow 22/tcp 2 allow 80 3 allow 443 4 allow 22/tcp 5 allow 80 6 allow 443 I don't currently see a way to distinguish between IPv4 and IPv6 rules other than accessing the lists in the backend object directly (but I don't think this is best practice). E.g.: rules_ipv4 = backend.rules rules_ipv6 = backend.rules6 One possible fix would be to add functions that return only the IPv4 or IPv6 rules. E.g.: def get_rules_ipv4(self): '''Return list of all ipv4 rules''' return self.rules def get_rules_ipv6(self): '''Return list of all ipv6 rules''' return self.rules6 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ufw/+bug/1951018/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1951018] [NEW] No ability to discern IPv4 vs IPv6 rules through Python
Public bug reported: Version: ufw 0.36 Ubuntu Version: 20.04.3 LTS There doesn't appear to be a Python method for accessing IPv4 and IPv6 rules in a distinguishable manner. In the source code (root/src/backend.py) there is an object that stores IPv4 and IPv6 rules in separate lists. Those lists are then accessed with the following method: def get_rules(self): '''Return list of all rules''' return self.rules + self.rules6 The issue with this is that the returned list doesn't contain an indication of what IP version each item corresponds to and would display something like the following. 1 allow 22/tcp 2 allow 80 3 allow 443 4 allow 22/tcp 5 allow 80 6 allow 443 I don't currently see a way to distinguish between IPv4 and IPv6 rules other than accessing the lists in the backend object directly (but I don't think this is best practice). E.g.: rules_ipv4 = backend.rules rules_ipv6 = backend.rules6 One possible fix would be to add functions that return only the IPv4 or IPv6 rules. E.g.: def get_rules_ipv4(self): '''Return list of all ipv4 rules''' return self.rules def get_rules_ipv6(self): '''Return list of all ipv6 rules''' return self.rules6 ** Affects: ufw (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to ufw in Ubuntu. https://bugs.launchpad.net/bugs/1951018 Title: No ability to discern IPv4 vs IPv6 rules through Python Status in ufw package in Ubuntu: New Bug description: Version: ufw 0.36 Ubuntu Version: 20.04.3 LTS There doesn't appear to be a Python method for accessing IPv4 and IPv6 rules in a distinguishable manner. In the source code (root/src/backend.py) there is an object that stores IPv4 and IPv6 rules in separate lists. Those lists are then accessed with the following method: def get_rules(self): '''Return list of all rules''' return self.rules + self.rules6 The issue with this is that the returned list doesn't contain an indication of what IP version each item corresponds to and would display something like the following. 1 allow 22/tcp 2 allow 80 3 allow 443 4 allow 22/tcp 5 allow 80 6 allow 443 I don't currently see a way to distinguish between IPv4 and IPv6 rules other than accessing the lists in the backend object directly (but I don't think this is best practice). E.g.: rules_ipv4 = backend.rules rules_ipv6 = backend.rules6 One possible fix would be to add functions that return only the IPv4 or IPv6 rules. E.g.: def get_rules_ipv4(self): '''Return list of all ipv4 rules''' return self.rules def get_rules_ipv6(self): '''Return list of all ipv6 rules''' return self.rules6 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ufw/+bug/1951018/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp