Welcome to the Linux Foundation Forum!

Hi All, The student material for CKAD is not available, any Ideas?

Hi All,
I have started CKAD recently but am not able to access the lab files. Does anyone knows where to get those from or is the Course being upgraded?

Thank You,

Best Answers

  • fcioanca
    fcioanca Posts: 2,150
    Answer ✓

    Hi @myousufm

    There are two different areas in the course mentioning how to retrieve the files needed for lab exercises: * Check out the Course Resources page in the introductory chapter to learn how to download them via the browser

    • Lab 2.1 in chapter 2 provides the command to download them via the command line interface.

    Regards,
    Flavia
    The Linux Foundation Training Team

  • fcioanca
    fcioanca Posts: 2,150
    Answer ✓

    There is a note to that effect (underscores) in the lab material as well.

Answers

  • Thanks fcioanca, just noticed that while pasting the underscores vanished, had to manually enter the underscores in the url.

    Thank You,
    Muhammad Yousuf

  • TBBle
    TBBle Posts: 13

    The missing underscores when copying the text is probably a problem in the source LaTeX document used to generate the PDF, see https://tex.stackexchange.com/q/42777 for the fix to that issue.

  • coop
    coop Posts: 916

    As the main maintainer of the LaTeX software used to generate the pdfs for the labs, I can state, with strong confidence, that it is not the source of the problems; they lie with the pdf reader. We do indeed use the proper fonts encoding and _ when necessary etc. In fact, not all pdf readers malfunction in this regard. This is why we tell people over and over do not cut and paste commands from pdfs; we give either "SOLUTIONS" or "RESOURCES" files that contain the material in pure text form that can be easily used.

  • TBBle
    TBBle Posts: 13
    edited January 2022

    Putting the course exercises PDF through qpdf to decompress the streams, I can confirm that the URL is being rendered as described in that TeX - LaTeX Stack Exchange post: The underscores visible in the URL are not underscores in the text, but graphical strokes.

    I would guess that whatever PDF view can get underscores when copying that text is recognising those strokes and turning them back into underscores when extracting. (I'd be curious to know which readers can extract an underscore from this text.)

    You can see below the S (stroke) command being used to fake an underscore between the ".../LDF259" text block and the "V2021-12-09" text block.

    ...
    0 0 1 rg 0 0 1 RG
    0 g 0 G
    0 0 1 rg 0 0 1 RG
    /F65 8.9664 Tf 0 -18.132 Td [($)-525(wget)-525(https://training.linuxfoundation.org/cm/LFD259/LFD259)]TJ
    ET
    q
    1 0 0 1 333.745 660.709 cm
    []0 d 0 J 0.398 w 0 0 m 2.824 0 l S
    Q
    BT
    /F65 8.9664 Tf 336.57 660.51 Td [(V2021-12-09)]TJ
    ET
    

    Font 65 (LMMono9-Regular) in that file has an underscore character defined, so the stroke must be being created earlier in the process, not at PDF-output time, which aligns pretty closely with the issue described in that post, although LMMono9 means that it's not the exact problem described there, as it's already using the lmodern package at least.

    Elsewhere on the same page, the underscore has worked fine, e.g. br_netfilter in:

    BT
    /F65 8.9664 Tf 60.907 214.098 Td [(student@cp:~$)-525(find)-525($HOME)-525(-name)-525(k8scp.sh)]TJ
    0 g 0 G
    0 0 1 rg 0 0 1 RG
    0 g 0 G
    0 0 1 rg 0 0 1 RG
     0 -31.881 Td [(student@cp:~$)-525(more)-525(LFD259/SOLUTIONS/s_02/k8scp.sh)]TJ
    0 g 0 G
    0 0.83 1 0.7 k 0 0.83 1 0.7 K
     0 -29.887 Td [(....)]TJ 0 -10.959 Td [(#)-525(Bring)-525(node)-525(to)-525(current)-525(versions)-525(and)-525(install)-525(an)-525(editor)-525(and)-525(other)-525(software)]TJ 0 -10.959 Td [(sudo)-525(apt-get)-525(update)-525(&&)-525(sudo)-525(apt-get)-525(upgrade)-525(-y)]TJ 0 -21.918 Td [(sudo)-525(apt-get)-525(install)-525(-y)-525(vim)-525(nano)-525(libseccomp2)]TJ 0 -21.918 Td [(#)-525(Prepare)-525(for)-525(cri-o)]TJ 0 -10.959 Td [(sudo)-525(modprobe)-525(overlay)]TJ 0 -10.959 Td [(sudo)-525(modprobe)-525(br_netfilter)]TJ 0 -10.959 Td [(....)]TJ
    0 g 0 G
    0 g 0 G
    ET
    

    which is also in font 65.

    Looking at the entire fire, I only see the underscores being 2.824-length strokes four times, two times each in the two uses of that filename on "Download shell scripts and YAML files" box on page 6, so I suspect that whatever is being used to trigger the monospaced lines in that box that reference the filename is the problem.

    Edit: Actually, being more liberal in my search, the _ in _V2021-12-09 in the footer of every page is also being stroked instead of treated as _, but it's 2.839 long so I missed it before.

    BT
    /F32 9.4645 Tf 56.631 19.8 Td [(V)]TJ
    ET
    q
    1 0 0 1 63.512 19.999 cm
    []0 d 0 J 0.398 w 0 0 m 2.839 0 l S
    Q
    BT
    /F32 9.4645 Tf 66.351 19.8 Td [(2021-12-09)-7122(\251)-278(Cop)15(yright)-278(the)-278(Lin)10(ux)-278(Foundation)-278(2022.)-344(All)-278(rights)-278(reser)-10(ved.)]TJ
    ET
    

    That 2.839-long stroke shows up in other places, like NET_ADMIN on page 67 in the body text, but the blue YAML box has the underscore correctly in NET_ADMIN.

    So it's not as simple as I hoped, but the problem is definitely in the PDF, not some bug in the reader.

  • TBBle
    TBBle Posts: 13
    edited January 2022

    Ran out of edit time, but I'll note that there's three sizes of strokes seen in the current labs PDF being used instead of underscores:

    • 2.824 in font 65 (LMMono9-Regular) - The URL and tar command filename for the lab solution download on page 6
    • 2.839 in font 32 (NimbusSanL-Bold) - The "V_2021-12-09" in the footer of each page, "such as CKAD_Curriculum_V1.22.1.pdf" on page 14, and cap_net_admin and cap_sys_time in the box text on pages 67 and 68.
    • 3.138 in font 64 (LMMono10-Regular) - Once on page 107, "View the run_cp.sh script."

    They're not all monospace, so I don't really have any idea why the document generation pipeline is doing that, based only on the visible context.

  • coop
    coop Posts: 916

    You. Are missing the point. You are never ever supposed to cut and paste from the PDFs. Making it easier would be counterproductive and will not happen. The microanalysis here is irrelevant.

  • TBBle
    TBBle Posts: 13

    Per https://forum.linuxfoundation.org/discussion/comment/32895/#Comment_32895 and the text itself, we are instructed to copy and paste the line that started this discussion, partly because the emailed version of that link points to the wrong version of the "RESOURCES" file.

    There's even instructions right there on what to do when the link copies-and-pastes with spaces, which suggest that's the expected flow for the user.

    If you don't intend people to cut-and-paste it, perhaps make it not a clickable link too, since right-click-and-copy-link is a pretty natural flow there. That's what I did initially, because I wanted to look at the file before I set up the VMs for the course.

    So maybe the messaging of "don't copy and paste this, get it from " could be clearer? And this is the first time I've heard "never ever cut and paste from the PDFs" in this environment, since it's an excellent way to avoid typos in the lab exercises.

    I'm sorry if you feel my investigation (and in my opinion, refutation) of your claim that the problem "lies with the pdf readers" is irrelevant, you're of course welcome to ignore it and not investigate why your build pipeline is producing PDFs like this.

    I enjoyed the investigation, as I learned a bunch of stuff about PDF internals which I hadn't looked at before.

  • akovi
    akovi Posts: 16

    You. Are missing the point. You are never ever supposed to cut and paste from the PDFs. Making it easier would be counterproductive and will not happen.

    Copying and pasting URLsis common sense in 2022. Maybe adding the real warning: DO NOT COPY PASTE EVEN THE URL (as we intentionally broke it, good luck figuring out what went wrong if you get a 404)

    The microanalysis here is irrelevant.

    The correct reply is: Thank you @TBBle!
    And you continue: but we don't care, even if it is an obvious mistake on our side.

    Really unprofessional attitude. Very disappointing.

Categories

Upcoming Training