<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>A Desipient Blog - pvc</title>
    <link rel="self" type="application/atom+xml" href="https://desipient.com/tags/pvc/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://desipient.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2024-05-01T00:00:00+00:00</updated>
    <id>https://desipient.com/tags/pvc/atom.xml</id>
    <entry xml:lang="en">
        <title>Rook CSI Provisioner Empty Secret</title>
        <published>2024-05-01T00:00:00+00:00</published>
        <updated>2024-05-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://desipient.com/blog/rook-csi-provisioner-empty-secret/"/>
        <id>https://desipient.com/blog/rook-csi-provisioner-empty-secret/</id>
        
        <content type="html" xml:base="https://desipient.com/blog/rook-csi-provisioner-empty-secret/">&lt;p&gt;I recently installed &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;rook.io&quot;&gt;rook&lt;&#x2F;a&gt; as the storage provider for my kubernetes
cluster, managed by ArgoCD. On first use of trying to provision a PVC, I came across
a small issue which proved difficult to diagnose, but easy to fix. Hopefully this
post is favoured by the search index gods, and finds its way to some poor sap facing
the same issue to help.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-initial-symptom&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-initial-symptom&quot; aria-label=&quot;Anchor link for: the-initial-symptom&quot;&gt;&lt;i class=&quot;icon&quot;&gt;&lt;&#x2F;i&gt;&lt;&#x2F;a&gt;
The initial symptom&lt;&#x2F;h2&gt;
&lt;p&gt;A new PVC is created, and stays perpetually in “Pending state”&lt;&#x2F;p&gt;
&lt;h2 id=&quot;initial-investigation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initial-investigation&quot; aria-label=&quot;Anchor link for: initial-investigation&quot;&gt;&lt;i class=&quot;icon&quot;&gt;&lt;&#x2F;i&gt;&lt;&#x2F;a&gt;
Initial investigation&lt;&#x2F;h2&gt;
&lt;p&gt;Following the rook &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;rook.io&#x2F;docs&#x2F;rook&#x2F;latest-release&#x2F;Troubleshooting&#x2F;ceph-csi-common-issues&#x2F;#provisioning-volumes&quot;&gt;troubleshooting guides&lt;&#x2F;a&gt;,
we check the provisioner logs, and see a whole bunch of logs of the provisioner
trying and failing to provision the PV:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;kubectl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; -n rook-ceph logs deploy&#x2F;csi-rbdplugin-provisioner -c csi-provisioner&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;W0501&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; 10:24:23.798564&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt;       1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; controller.go:934] Retrying syncing claim &amp;quot;0f1a6d42-0f9b-47a0-9e62-aa36310f3ea5&amp;quot;, failure&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 385&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;I0501&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; 10:24:23.798780&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt;       1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; event.go:364] Event&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;v1.ObjectReference&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;{Kind:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;&amp;quot;PersistentVolumeClaim&amp;quot;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; Namespace:&amp;quot;pvc-demo&amp;quot;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Name:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;&amp;quot;my-new-pvc&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; UID:&amp;quot;7eaef04d-6af8-4104-8cae-8b0edf5f2ed8&amp;quot;, APIVersion:&amp;quot;v1&amp;quot;, ResourceVersion:&amp;quot;89671786&amp;quot;, FieldPath:&amp;quot;&amp;quot;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9399B2;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;type:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; &amp;#39;Warning&amp;#39; reason: &amp;#39;ProvisioningFailed&amp;#39; failed to provision volume with StorageClass &amp;quot;cluster-ceph&amp;quot;: rpc error:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F5C2E7;&quot;&gt;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; = InvalidArgument desc = provided secret is empty&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; = InvalidArgument desc = provided secret is emptycode = InvalidArgument desc = provided secret is emptycode = InvalidArgument desc = provided secret is emptycode = InvalidArgument desc = provided secret is empty&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Plugging some of these errors into your search engine of revealed a grand total
of… 6 search results, and nothing relevant.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-issue-background&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-issue-background&quot; aria-label=&quot;Anchor link for: the-issue-background&quot;&gt;&lt;i class=&quot;icon&quot;&gt;&lt;&#x2F;i&gt;&lt;&#x2F;a&gt;
The issue - background&lt;&#x2F;h2&gt;
&lt;p&gt;Reading through the rook storage configuration &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;rook.io&#x2F;docs&#x2F;rook&#x2F;latest-release&#x2F;Storage-Configuration&#x2F;Block-Storage-RBD&#x2F;block-storage&#x2F;#provision-storage&quot;&gt;docs&lt;&#x2F;a&gt;,
the block storage StorageClass definition needs to define a number of standard
&lt;code&gt;csi.storage.k8s.io&lt;&#x2F;code&gt; parameters defining secret names with the credentials required
for connectivity.&lt;&#x2F;p&gt;
&lt;p&gt;Indeed, having a look at the values.yaml of the rook cluster helm chart used to
install the release via argo, the default block pool does indeed &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rook&#x2F;rook&#x2F;blob&#x2F;release-1.14&#x2F;deploy&#x2F;charts&#x2F;rook-ceph-cluster&#x2F;values.yaml#L491&quot;&gt;define&lt;&#x2F;a&gt;
these parameters.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-issue-my-mistake&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-issue-my-mistake&quot; aria-label=&quot;Anchor link for: the-issue-my-mistake&quot;&gt;&lt;i class=&quot;icon&quot;&gt;&lt;&#x2F;i&gt;&lt;&#x2F;a&gt;
The issue - my mistake&lt;&#x2F;h2&gt;
&lt;p&gt;However, I had overridden the &lt;code&gt;cephBlockPools&lt;&#x2F;code&gt; list in my own values, creating a
pool with a custom name and replication specification. What I &lt;em&gt;didn’t&lt;&#x2F;em&gt; do was provide
the credentials parameters for its StorageClass, as I’d assumed that these were
fairly standard, and would be included by default if I didn’t provide overrides.&lt;&#x2F;p&gt;
&lt;p&gt;I assumed wrong.&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-fix&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-fix&quot; aria-label=&quot;Anchor link for: the-fix&quot;&gt;&lt;i class=&quot;icon&quot;&gt;&lt;&#x2F;i&gt;&lt;&#x2F;a&gt;
The fix&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;Ctrl-c&lt;&#x2F;code&gt;, &lt;code&gt;Ctrl-v&lt;&#x2F;code&gt; the secrets parameters from the default values to my block pool’s
StorageClass definition, let Argo redeploy the cluster, and wait.&lt;&#x2F;p&gt;
&lt;p&gt;A few minutes later, success! Our PVs are now provisioned!&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;As a high school maths teach of mine was fond of saying - When you &lt;em&gt;assume&lt;&#x2F;em&gt;,
you make an &lt;em&gt;ass&lt;&#x2F;em&gt; out of &lt;em&gt;u&lt;&#x2F;em&gt; and &lt;em&gt;me&lt;&#x2F;em&gt;.&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;The man was himself, indeed, an ass. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
</feed>
