Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722674 - sys-block/targetcli-fb-2.1.51 fails to load config
Summary: sys-block/targetcli-fb-2.1.51 fails to load config
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Diogo Pereira
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-05-12 11:15 UTC by Mario Bachmann
Modified: 2020-09-01 22:07 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Bachmann 2020-05-12 11:15:14 UTC
targetcli-fb-2.1.51 fails to load config. 

Reproducible: Always

Steps to Reproduce:
1. active targets were configured with targetcli-fb-2.1.49
2. upgrade to targetcli-fb-2.1.51
3. save running config and try to reload it fails
Actual Results:  
Try to reload the saved config with targetcli-fb-2.1.51 fails:
targetcli restoreconfig /etc/target/saveconfig.json 
restore_from_file() takes from 1 to 4 positional arguments but 5 were given


Expected Results:  
The version 2.1.51 should be able to load the config saved with the same version. 

Beside: the older version targetcli-fb-2.1.49 worked and works. 

Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.31-r2, 5.6.8 x86_64)
=================================================================
System uname: Linux-5.6.8-x86_64-AMD_Athlon-tm-_5350_APU_with_Radeon-tm-_R3-with-gentoo-2.7
KiB Mem:    15832044 total,   6469220 free
KiB Swap:    8388604 total,   8381180 free
Timestamp of repository gentoo: Tue, 12 May 2020 10:15:01 +0000
Head commit of repository gentoo: c9c8fb91beb6cab066ba10d99a1678e14c5c44e6
sh bash 5.0_p17
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
app-shells/bash:          5.0_p17::gentoo
dev-lang/perl:            5.30.2::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo
dev-util/cmake:           3.17.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo, 2.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34::gentoo
sys-devel/gcc:            9.2.0-r3::gentoo, 9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync8.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

mario
    location: /usr/portage_overlay
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=btver2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=btver2 -O2 -pipe"
DISTDIR="/data1/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://core/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://mirrors.evowise.com/gentoo/ http://mirror.leaseweb.com/gentoo/ http://ftp.fau.de/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirrors.soeasyto.com/distfiles.gentoo.org/ http://mirror.dkm.cz/gentoo/ http://gentoo.mirror.web4u.cz/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.netcologne.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://tux.rainside.sk/gentoo/ http://gentoo.wheel.sk/ http://mirror.bytemark.co.uk/gentoo/ http://gentoo.modulix.net/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ http://ftp.romnet.org/gentoo/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j4 -l4"
PKGDIR="/data1/gentoo/packages/jaguar"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="7zip X a52 aac acl acpi alsa amd64 avx berkdb bzip2 cairo cdparanoia cli consolekit crypt cups custom-cflags custom-cpuopts custom-cxxflags custom-optimization dbus dri dvb dvd dvdr egl encode exif fam flac fortran g3dvl gbm gdbm glamor gles2 gnutls iconv icu ilbc imagemagick imlib jpeg kpathsea lame lcms libsamplerate libtirpc linguas_de lm_sensors lzo mad mmx mp3 multilib ncurses nls nptl ogg openal opengl openmp openvg pam pcre pdf png readline sdl seccomp semantic-desktop smp speex spell split-usr sse sse2 sse3 ssl ssse3 svg tcpd theora threads tiff truetype unicode usb vdpau vorbis x264 xattr xcb xcomposite xine xinerama xml xmp xulrunner xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="dav dav_fs dav_lock alias auth_basic authn_file authz_groupfile authz_host authz_user autoindex deflate dir filter ident log_config logio mime proxy proxy_http status cgi unixd access_compat socache_shmcb authn_core authz_core" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby25" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mario Bachmann 2020-05-12 11:16:26 UTC
# targetcli --version
/usr/lib/python-exec/python3.7/targetcli version 2.1.51

# targetcli 
targetcli shell version 2.1.51
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> ls
[shows my running config configured with targetcli-fb-2.1.49]

/> exit
Global pref auto_save_on_exit=true
Configuration saved to /etc/target/saveconfig.json
so saveconfig.json is saved with targetcli-fb-2.1.51

try to reload the saved config with targetcli-fb-2.1.51 fails:
targetcli restoreconfig /etc/target/saveconfig.json 
restore_from_file() takes from 1 to 4 positional arguments but 5 were given
Comment 2 Diogo Pereira 2020-05-17 20:58:32 UTC
The cause seems to be this commit in rtslib-fb: https://github.com/open-iscsi/rtslib-fb/commit/e3758d96e1a1baaedd46514446a1f75cc1e234ce#diff-b46ec0ec91651274dde0f46f9a6cde4cL406

The dependency should be >=dev-python/rtslib-fb-2.1.70, but the only version in the tree is 2.1.69.

I opened a PR to bump rtslib-fb to 2.1.72: https://github.com/gentoo/gentoo/pull/15856
Comment 3 Larry the Git Cow gentoo-dev 2020-08-25 00:10:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=934814f627d542bae52f0500ad6cf003525e23f2

commit 934814f627d542bae52f0500ad6cf003525e23f2
Author:     Diogo Pereira <sir.suriv@gmail.com>
AuthorDate: 2020-08-16 23:14:05 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-08-25 00:06:07 +0000

    sys-block/targetcli-fb: bump to 2.1.53
    
    Bug: https://bugs.gentoo.org/722674
    Bug: https://bugs.gentoo.org/736086
    Closes: https://bugs.gentoo.org/718528
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Diogo Pereira <sir.suriv@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/17142
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-block/targetcli-fb/Manifest                   |  1 +
 sys-block/targetcli-fb/targetcli-fb-2.1.53.ebuild | 28 +++++++++++++++++++++++
 2 files changed, 29 insertions(+)