• [6.6.0] Docker CPU Pinning not persistent, params reappearing


    LesterCovax
    • Minor

    I tried to fix this odd issue for about an hour earlier with no success.  Unraid is setting CPU pinning for containers even after I remove these definitions.  I've tried ensuring that there's nothing set under "Settings > CPU Pinning" for any docker containers, removing a container/image and recreating from a template that doesn't contain the `--cpuset-cpus` param (NOTE: there needs to be an inline code option here, not just code block), rebooting, etc.  

     

    For example, I'll start off with no CPU Pinning defined for my Docker containers in settings

    image.png.cf71a2b03c3229c17aebdfac3bf261a2.png

     

    If I go to one of the problem containers (pretty much all of them I think), it will have a `--cpuset-cpus` param set that was not there upon creation.

    image.png.5a494347928930aaa5504ce65ce7ac87.png

     

    If I delete the contents of 'Extra Parameters:', hit 'Apply', and go back to edit the container, the `--cpuset-cpus` param is back again.  Even if I turn on template authoring mode, save the changes and create it from my template, it magically reappears.  Pretty annoying and kind of backwards considering the param was supposed to be deprecated in favor of the GUI pinning options.

     

     

    undou-diagnostics-20180921-0213.zip




    User Feedback

    Recommended Comments

    Tested, and adding/removing "extra parameters" works as expected.

    It is unclear why in your case it isn't working. Workaround: delete the container and recreate it

    • Upvote 1
    Link to comment
    Sep 21 00:56:09 undou root: Fix Common Problems: Warning: Docker Application nzbget has CPU cores pinned via the extra parameters (--cpuset-cpus)
    Sep 21 00:56:09 undou root: Fix Common Problems: Warning: Docker Application radarr has CPU cores pinned via the extra parameters (--cpuset-cpus)
    Sep 21 00:56:09 undou root: Fix Common Problems: Warning: Docker Application sonarr has CPU cores pinned via the extra parameters (--cpuset-cpus)

    Those 3 containers all have the entry in extra parameters

     

    Additionally, Radarr also has cores pinned via the GUI

    Sep 21 00:56:09 undou root: Fix Common Problems: Error: Docker Application radarr has duplicated entries for CPU pinning

    One of the side effects of having the duplicated entries is that on the CPU pinning page, any changes you make to a container that has something already in extra parameters will appear to not take effect at all.  (and they will appear to not save). unRaid's GUI does not add anything to the extra parameters line for pinning, but rather uses a completely different tag.

     

    Are you positive that the template you're adding the app from does not already contain the cpu pinning in extra parameters?

    • Upvote 1
    Link to comment
    On 9/21/2018 at 4:28 AM, bonienl said:

    Tested, and adding/removing "extra parameters" works as expected.

    It is unclear why in your case it isn't working. Workaround: delete the container and recreate it

    As I mentioned, I already tried deleting and recreating it and even tried using a new template.  It continues to add the parameters.  I think it's something screwy with the CPU Pinning options in Settings.  I just checked and there are values marked again in there that I never set.  In fact, I had removed those settings, saved, and rebooted to confirm.  It seems to have a mind of its own.

     

    image.png.a9b2c18d085847c8a3f46322a25a8162.png

    On 9/21/2018 at 10:19 PM, Squid said:

    Are you positive that the template you're adding the app from does not already contain the cpu pinning in extra parameters?

    Yes, I mentioned that I even created a new template that doesn't have extra parameters set, nor the GUI options.  As soon as I create it from the template it's adding the extra params.

     

    image.png.6cd5f2f5a1033b4b3034499542268bc0.png

    • Upvote 1
    Link to comment

    I can record a video of what's happening on my end if it would help since the diagnostic bundle apparently isn't showing the full story.  If there's anything specific (e.g. specific steps in the GUI, CLI commands) you'd like me to include, let me know.

     

    I also tried manually creating the docker image via CLI and it's still adding the extra-param

    root@undou:~# docker images
    REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
    linuxserver/sonarr                  latest              7491f3da74a2        2 days ago          576MB
    linuxserver/nzbget                  latest              7f1e8f590f23        2 days ago          75.7MB
    linuxserver/tautulli                latest              df4f0f0d6ee9        9 days ago          188MB
    brettm357/unifi                     latest              d259b09081bf        12 days ago         610MB
    nanocurrency/nano-beta              latest              5d46b0c2ac89        13 days ago         122MB
    nanocurrency/nano                   latest              cdecaab45885        13 days ago         122MB
    adamfisher90/docker-deluge-1.3.11   latest              249049a9cda6        17 months ago       142MB
    root@undou:~# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='radarr' --net='br0' --ip='10.0.0.77' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'TCP_PORT_7878'='7878' -e 'PUID'='99' -e 'PGID'='100' -v '/mnt/movies/.snatched':'/downloads':'rw' -v '/mnt/movies':'/movies':'rw' -v '/mnt/media/Anime':'/anime':'rw' -v '/mnt/user/appdata/radarr':'/config':'rw' 'linuxserver/radarr'

    Even after saving the template update to remove the extra-param, I checked the actual template file and it persisted, meaning that template authoring mode isn't working correctly for some reason.  Due to this, I deleted the image/container once again and created it from an Unraid provided template that didn't have an extra-param defined (https://forums.unraid.net/topic/53758-support-linuxserverio-radarr/).

     

    After creating this new instance, the CPU pinning extra-param resurfaced once again:

    image.thumb.png.1ab0c1bba4987bcc98e77d1ee20c8a29.png

     

    I had to manually go into "/boot/config/plugins/dockerMan/templates-user/my-Radarr.xml" and change "<ExtraParams>--cpuset-cpus=1</ExtraParams>" to "<ExtraParams/>", along with any other values I wanted to persist. 

     

    Port mappings via config settings also aren't working correctly as it's using the legacy port mapping style (https://docs.docker.com/network/links/#environment-variables).  Even though I have the following in my ".../my-NZBget.xml" template, it's still translating to "-e 'TCP_PORT_6789'='6788'" upon creating the docker container with the effective port mapping of "-p 6789:6789" (which is incorrect).  I have to manually add in an extra-param of "-p 6788:6789", and remove the config entry for the port mapping for it to work correctly.

    <!-- Snipped Code -->  
    <Networking>
        <Mode>br0</Mode>
        <Publish>
          <Port>
            <HostPort>6788</HostPort>
            <ContainerPort>6789</ContainerPort>
            <Protocol>tcp</Protocol>
          </Port>
        </Publish>
    </Networking>
    <!-- Snipped Code -->
    <Config Name="Host Port" Target="6789" Default="6788" Mode="tcp" Description="Container Port: 6789" Type="Port" Display="always" Required="false" Mask="false">6788</Config>

    CPU pinning is also not saving in the template via the GUI.  I had to manually change "<CPUset/>" to "<CPUset>0,1</CPUset>" in the XML template.  After doing so, the GUI correctly shows the following when loading the template:

    image.thumb.png.455207484dd85900867622b701411a05.png

     

    I ended up just creating my own repo of templates, which appears to work correctly.  The only thing that's still not working is port forwarding (i.e. '-p 6788:6789') even when it's in the extra params or even specifying '/tcp'.

     

    • Upvote 1
    Link to comment
    On 10/4/2018 at 2:25 PM, ephdisk said:

    The original is still unable to be modified.  

    Can you post the content of this XML file

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.