Skip to content

Instantly share code, notes, and snippets.

Avatar

Ancor Gonzalez Sosa ancorgs

  • Suse Linux Gmbh
  • Las Palmas de Gran Canaria
View GitHub Profile
View gist:ca65f45164f06090c0d2f43fa64fae2d
if AutoinstReporter
if error?
Please correct these problems and try again
[Abort]
else
Do you want to continue?
[Yes] [No]
end
else (Reporter)
No extra message
@ancorgs
ancorgs / password_last_change.md
Last active May 13, 2021
Options for last_change
View password_last_change.md

The initial situation

The third field of /etc/shadow contains the date of last password change. It can contain:

  • An empty string: means that aging features are disabled
  • A zero: means the user must change the password in next login
  • A set of digits: represents the date of the latest password change

We currently have this, which doesn't fly because we cannot distinguish if a value of nil really means that aging is disabled or simply that we do not know the date/state, for example for a new user that is not written to /etc/shadow yet.

@ancorgs
ancorgs / recent_feedback.md
Last active Jan 8, 2021
Recent feedback for YaST
View recent_feedback.md

End of year 2020 survey

General announcement in the mailing list

I got early access to all the individual answers. Things I see mentioned several times:

  • About the installation:
    • Quite some people say it should be simpler
    • Most concrete complaints are about how hard is to setup the storage and the WiFi.
  • In a running system:
@ancorgs
ancorgs / strange.txt
Last active Dec 15, 2020
yardoc differences
View strange.txt
In my laptop:
> yardoc -v
yard 0.9.25
> yardoc
Files: 576
Modules: 79 ( 14 undocumented)
Classes: 688 ( 4 undocumented)
Constants: 127 ( 42 undocumented)
@ancorgs
ancorgs / disk_test.md
Last active Nov 2, 2020
Proposed test cases for the _netdev option
View disk_test.md

Proposed RSpec output for Y2Storage::Disk

#in_network?

  • if the #driver_modules reported by hwinfo for the disk include iscsi-tcp, bnx2i or qedi
    • returns true
  • if the #driver_modules reported by hwinfo for the disk include fcoe, bnx2fc or qedf
    • returns true
  • if the #driver_modules reported by hwinfo for the disk does not include any of the values above
    • returns false
@ancorgs
ancorgs / disk_test.md
Last active Nov 2, 2020
Test cases for the _netdev option
View disk_test.md

RSpec output for Y2Storage::Disk (excerpt)

#in_network?

  • for a disk with data transport fcoe
    • returns true
  • for a disk with data transport iscsi
    • returns true
  • for a disk with data transport fc (same applies to sbp, sas, sata, spi & usb)
    • returns false
  • for a disk with unknown data transport
View quotas-libstorage.md

Moving qgroup probing/editing to libstorage-ng

Reasons to do it

  • The same mounting used to probe the subvolumes could be used to probe the qgroups.

  • The same mounting used during the libstorage-ng's commit phase to create the subvolumes could be used to modify the qgroups.

View extended-devicegraph.txt
HWInfoReader
include Singleton
#for_device
#reset
#reset is called by StorageManager during probing
Stores the information into the singleton object
Reads the information in the first call to #for_device
#for_device is called by BlkDevice
View proposal_failed.md

The base classes

Y2Storage (yast2-storage-ng) provides the two main classes to calculate proposals (with a common base class).

Let's see the relevant information about failed proposals and so on.

# Class to calculate a storage proposal
#
# @note This is a base class. To really perform a proposal, see classes
@ancorgs
ancorgs / 00-packages-probing.md
Last active Mar 3, 2020
Installing packages during yast2-storage-ng probing: usability
View 00-packages-probing.md

The original problem

If YaST is used to partition/format/encrypt/whatever some storage devices but the system lacks some of the tools needed to perform the operations, YaST has always shown a dialog alerting about the situation and allowing to install the missing packages. It looks like this:

Commit pop-up

But the presence of those tools was only checked at the end of the process, when YaST needed them to create/format/encrypt new devices (in the screenshot above, YaST asked for cryptsetup because