[Bug 1641656] Re: initramfs parameters invalid for IPv6 portal

Ubuntu Foundations Team Bug Bot 1641656 at bugs.launchpad.net
Thu Nov 17 08:31:05 UTC 2016


The attachment "iscsi_settings.patch" seems to be a patch.  If it isn't,
please remove the "patch" flag from the attachment, remove the "patch"
tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the
team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to partman-iscsi in Ubuntu.
https://bugs.launchpad.net/bugs/1641656

Title:
  initramfs parameters invalid for IPv6 portal

Status in partman-iscsi package in Ubuntu:
  New

Bug description:
  In init.d/iscsi the portal address is collected thusly:
  echo "$(cat "$connectiondev/persistent_address"):$(cat "$connectiondev/persistent_port"),$(cat "/sys/$sessiondev/tpgt")" >iscsi_portal

  resulting in an iscsi_portal file looking like
  2606:a000:a449:5900::4:3260,1

  In finish.d/iscsi_settings, this string is then picked apart:
          group="${portal##*,}"
          portal="${portal%,*}"
          ip="${portal%%:*}"
          port="${portal#*:}"

  These variables are then used to populate iscsi.initramfs, which ends up looking like this:
  ISCSI_TARGET_NAME="iqn.2016-11.net.nivex:storage.istest"
  ISCSI_TARGET_IP="2606"
  ISCSI_TARGET_PORT="a000:a449:5900::4:3260"
  ISCSI_TARGET_GROUP="1"
  ISCSI_USERNAME="istest"
  ISCSI_PASSWORD="123456789012"

  I think the easiest fix would be to switch the greed of the matching, as in:
          ip="${portal%:*}"
          port="${portal##*:}"
  though I worry about naively splitting on colon when dealing with IPv6 addresses like this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/partman-iscsi/+bug/1641656/+subscriptions



More information about the foundations-bugs mailing list