Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-15988

RHT2526054: DO380: Ch03s04: Feedback

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • DO380 - RHOCP4.14-en-3-20250418
    • DO380
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • en-US (English)

      Please fill in the following information:


      URL: https://rol.redhat.com/rol/app/courses/do380-4.14/pages/ch03s04
      Reporter RHNID: wasim-rhls
      Section Title:                      Guided Exercise: Node Configuration with the Machine Configuration Operator                                                  

      Issue description

      Perhaps it may be useful to undertake a brief but thorough examination of this lab, with the sole aim of refining it where refinement might naturally suggest itself.

      In doing so, I observed that the live 99-worker-chrony-conf-override MachineConfig differs in several respects from the version generated by Butane. The live manifest specifies gzip compression, whereas the Butane-generated manifest does not. In addition, Butane immediately normalizes the ignition version to 3.4.0 and converts decimal to octal mode. There are also differences in indentation. Regarding encoding, the live manifest uses ;base64 with defaults, while the Butane-generated manifest uses URL encoding. This distinction arises because the Butane file in the Installation Configuration OpenShift book follows the inline approach rather than the source approach. The latter allowing base64 encoding with or without explicitly stating defaults. Both approaches are valid; neither is, strictly speaking, incorrect.

      A similar pattern emerges when comparing 99-worker-chrony-conf-override with the solution MachineConfig. Again, we encounter differences in compression and spacing. The encoding in the solution is base64 with defaults (text/plain;charset=utf-8). Explicitly specifying defaults is, of course, entirely permissible. These differences are noteworthy only insofar as both manifests presumably originate from the same team—the same team that, one assumes, also authors the surrounding materials.

      Turning next to the 51-infra MachineConfig example in the OpenShift 4.14 MachineConfig documentation, further variations appear: compression, encoding, spacing, and even element order. The solution MachineConfig orders elements alphabetically, much like the live chrony manifest, whereas the documentation example does not. Once again, all of these options remain valid.

      Which brings me, quite naturally, to the question of improvement.

      Butane offers several advantages that resolve many of these discrepancies automatically. It converts octal modes to decimal without deliberation, orders elements consistently, and enforces uniform spacing. In my view, the Butane source approach is preferable to the inline approach when generating MachineConfigs. ASCII files are prone to subtle, invisible characters—newlines, tabs—that editors such as vi do not readily reveal. Using base64 -w0 file in combination with Butane’s source mechanism avoids copy-paste errors and incidental editing mistakes entirely.

      By adopting Butane, spacing and ordering issues are resolved at once, and a single, consistent standard for authoring MachineConfigs emerges organically.

      Might it therefore be worth considering Butane as the gold standard for this type of exercise?

      In the same spirit, I would also suggest the inclusion of a grading script, so that its logic may be discussed openly and placed—so to speak—where it belongs: at the center of the public discussion. Were I to write such a script, I would likely rely on yq to inspect individual values, thereby deliberately ignoring inconsequential differences such as ordering or spacing.

      At present, I have been unable to determine how grading is performed in the comprehensive review lab. I also note that the grading logs appear to be empty, despite having upgraded the lab scripts in accordance with the DO380 lab upgrade guidance.

      I trust these observations may be received in the constructive spirit in which they are offered. 

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

              gls-curriculum-ocp-core@redhat.com PTL - OCP Platform Team
              wraja@redhat.com Wasim Raja
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: