Skip to content

Instantly share code, notes, and snippets.

View joseivanlopez's full-sized avatar

José Iván López joseivanlopez

  • Suse Linux Gmbh
  • Las Palmas de Gran Canaria
View GitHub Profile

Changes in storage APIs

D-Bus API

org.opensuse.Agama.Storage1
  #ProductConfig - JSON {transactional, volumes, encryptionMethods}
  #Probe - only probes the system (*without calculating a proposal)
  #SetSettings - set JSON settings (or AutoYaST)
 #GetSettings - get JSON settings (or AutoYaST)

Reevalute the storage guided settings

The storage section of the Agama settings has two different parts: the specification of the devices (e.g., drives, volumeGroups, etc) and the so called guided settings:

"storage": {
  "drives": [],
  "volumeGroups": [],
  "mdRaids": [],
 "guided": {}

Storage HTTP and D-Bus APIs

Storage proposal settings

There are different ways for indicating the storage proposal settings: through a D-Bus call, from a JSON config file, through a HTTP call (JSON), and from a YAML product file.

Through a D-Bus call

  • The #Calculate D-Bus method is called with the expected D-Bus data (a{sv}).
  • The storage service generates a ProposalSettings ruby object from the D-Bus data and calculates the proposal.

Agama Auto-installation (Storage Settings)

Format specification

Storage
  disk <Disk[]>
  md <MD[]>
  lvm <VolumeGroup[]>
  bcache <BCache[]>
 nfs 

Agama Auto-installation (Storage Settings)

Format specification

Storage
  drives <Drive[]>
  volume_groups <VolumeGroup[]>
  software_raids <SoftwareRaid[]>
  bcache_devices <BCache[]>
 nfs_devices 

Agama Roadmap

Features To Implement

Architectural Changes

  • Drop Cockpit dependency.
  • Replace Cockpit login by own solution.
    • Check proposed solution with security team.
  • Replace Cockpit translation system by own solution.

Software conflicts in agama

Agama uses yast2-packager and yast2-pkg-bindings API for selecting patterns/packages and solving dependencies, calling to the libzypp C++ library under the hood.

Sometimes there are conflicts with the selected packages/patterns. In that cases, the zypp resolver fails and reports a list of problems. In that cases, the YaST Packager UI shows the poblems to the user, allowing to select a solution for each problem.

Agama needs something similar to YaST Packager in order to notify and fix the solver problems. This document analyzes how to bring that feature to Agama.

Solver problems from libzypp

Agama And Product Registation

This document analyses different approaches for registering a product and exposes some possible solutions for implementing registration in Agama.

Installation Vs Registration (Chicken-egg Problem)

An installer like Agama (or YaST) needs to know any repository from which to get the packages of the product to install.

SUSE repositories are only known after registering a product, but SUSEConnect CLI (i.e., the official tool for registering) cannot register a product unless it is already installed. So, how is the system actually installed by YaST?

Agama Storage Overview

Storage

2 devices used for the installation:

512 GiB Micron 100 SATA vda 1 TiB Assus 2239 vdb

Manager
  Probe(product)
    Software#SelectProduct
    Storage#Probe ?
    Storage#Calculate
    Software#Probe

Storage
 Probe