Skip to content

Instantly share code, notes, and snippets.

View ancorgs's full-sized avatar

Ancor Gonzalez Sosa ancorgs

  • Suse Linux Gmbh
  • Las Palmas de Gran Canaria
View GitHub Profile
@ancorgs
ancorgs / gist:23b5fbb845cca31c2b61b2a87751bd20
Created November 27, 2025 13:29
Current status of ProposalPage
Elements (assuming there are candidate devices)
==============================================
a) ProposalFailedInfo
"Failed to calculate a storage layout"
b) FixableConfigInfo
"The configuration must be adapted to address the following issues"
c) UnsupportedModelInfo
"Config is valid (see result below) but not supported by UI [button to reset]"
@ancorgs
ancorgs / ibft.md
Last active August 20, 2025 13:26
iBFT initialization in Agama

Agama uses this code to initialize iSCSI and iBFT. It looks quite reasonable.

def activate
  start_services
  Yast::IscsiClientLib.getiBFT
  # Check initiator name, creating one if missing.
  return false unless Yast::IscsiClientLib.checkInitiatorName(silent: true)

 # Why we need to sleep here? This was copied from yast2-iscsi-client.
@ancorgs
ancorgs / space_policy.md
Last active July 10, 2025 19:34
New SpacePolicy approach

Initial remarks

When saying "drive" I mean any reused partitionable.

The spacePolicy is a concept that exists in the model but not in the config.

Right now, all drives in the model always have a spacePolicy value. Even those that do not contain partitions, or that are going to be formatted, or whatever.

On the contrary, the UI only shows the SpacePolicyMenu when it makes sense. Since you only need

This is the definition of a thin pool:

{
  "logicalVolumes": [
    {
      "size": "40 GiB"
      "name": "hanalv",
      "pool": true
 }
@ancorgs
ancorgs / 00-master-apqns.md
Last active December 5, 2024 15:53
Master key and APQNs

Proposal of interface to select the APQNs on YaST based on the configured master keys.

This adapts the interface to support both EP11 and CCA and, in the latter case, to select between AES DATA and AES CIPHER.

One important change (compared to the current YaST UI), is that APQNs without a valid current AES or P11 master key are not even considered.

Adding master key selection, EP11 cards and key types results in many, many possible combinations. Let's try to describe how the new UI works in all those cases. The screens are displayed as 80x24 text mode.

Scenario 1. There is only one APQN from a EP11 card with a valid key (1 key, 1 EP11 APQN)

@ancorgs
ancorgs / demo.md
Created November 22, 2024 11:44
Result of one day of Hack Week
@ancorgs
ancorgs / storage-profile.md
Last active May 24, 2024 11:15
Agama storage profile

Storage Section of the Agama Profile

Supporting a Legacy AutoYaST Specification

The Agama profile should contain a storage section. If it's omitted, an alternative section called legacy_autoyast_storage can be specified instead.

That legacy_autoyast_storage is a 1:1 representation of the XML specification of AutoYaST. No json validation will be performed for it.

Basic Structure of the Storage Section

@ancorgs
ancorgs / 00-autoinst_proposal-summary.rb
Last active May 21, 2024 08:31
Considering Agama storage autoinstallation
# Class to calculate a storage proposal for autoinstallation
#
# @example Creating a proposal from the current AutoYaST profile
# partitioning = Yast::Profile.current["partitioning"]
# proposal = Y2Storage::AutoinstProposal.new(partitioning: partitioning)
# proposal.proposed? # => false
# proposal.devices # => nil
# proposal.planned_devices # => nil
#
# proposal.propose # Performs the calculation
@ancorgs
ancorgs / deleteme.md
Last active January 17, 2024 12:56
delete-me

abbr

<Checkbox
  label={_("Use the TPM to decrypt automatically on each boot")}
  description={
    _(The password will not be needed to boot or to access de data in the <abbr title=\"Trusted Platform Module\">TPM</abbr>..."
  }
/&gt;
@ancorgs
ancorgs / zones.md
Last active December 19, 2023 08:57
Timezones known by Agama but not known by zone.tab

The file zone.tab allow us to map timezones to a representative country. Basically, the country in which the city mentioned in the name of the timezone is located.

Good news - that mapping actually works for 434 of the timezones Agama offers.

Not so good, there are 39 missmatches. So there are timezones for which we cannot inferre the country.

Let's group them

A. No country, indeed