Forum Discussion

Alscion_68122's avatar
Alscion_68122
Icon for Nimbostratus rankNimbostratus
Sep 07, 2011

Update admin partition

Hi all,

 

 

Trying to update my script from v10 to v11 and have trouble with updating admin partition:

 

 

In v10, i used the following instructions to select the admin partition I wanted to create some object where the variable $part content the name of my partition:

 

 

tmsh::modify cli admin-partitions all-partitions $part

 

 

In v11, i try to do it with the following instructions, but I have an error "admin-partitions may only be specified in a config file"

 

 

tmsh::modify cli admin-partitions { update-partition $part }

 

 

 

I checked the chapter cli/admin-partitions of the documentation and posts on devcentral but didn't find any solution. Does anybody have an idea?

 

 

Thanks!

 

8 Replies

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    In V11 partitions are present, but not quite as visible as in prior versions.

     

     

    Partitions and top level folders mirror each other.

     

    When a partition is created a top level folder is created

     

    tmsh create auth partition abc

     

    Will create a partition and will also create the folder /abc.

     

    tmsh list sys folder /abc

     

     

    When a top level folder is created a corresponding partition will also be created.

     

    tmsh create sys folder /efg

     

    Will create the folder and also create a partition

     

    tmsh list auth partition /efg

     

     

    The cd command is used to move to a different partition.

     

     

    tmsh cd /efg (you are now in the /efg folder and the efg partition)

     

     

    tmsh create sys folder /efg/xzy

     

    tmsh cd /efg/xyz (you are in the /efg/xyz folder and still in the efg partition)

     

     

  • Hi Mark,

     

     

    Thanks for your Reply, i tried to create new folders/partition and I can navigate among them and create objects as I want.

     

     

    But when I upgrade a box from v10 to v11, partitions (created on v10, before the upgrade) are correctly available on v11 but folders are not created, so I can't navigate and update or create new objects on a partition created in v10 on a box updated in v11.

     

     

    I continue to investigate but if you have a tip, i'm interrested.

     

     

    Best Regards.
  • Brent_West_7733's avatar
    Brent_West_7733
    Historic F5 Account
    It may be worth noting here that when you are using a TMSH script to create or modify in v11 you can reference them thusly:

     

     

    tmsh::command module partition/object { parameters }

     

     

    for example:

     

    tmsh::create ltm virtual /Common/VS_abc {destination ... }
  • Ariel_Santa_Cr1's avatar
    Ariel_Santa_Cr1
    Historic F5 Account

    Can I execute a comand/action on all partitions at the same time? Is there an "ALL" option? I need to remove an irules across 600 partitions and can't find a good way to do it. I'm thinking in remove the actions of the irule to simulate a near zero activity but I would like a more elegant way to do it. (meaning remove the irule from each VS). Thanks

     

  • Brent_West_7733's avatar
    Brent_West_7733
    Historic F5 Account

    You could use a TMSH script to retrieve a list of partitions, set irulename set tmsh::get_config partitions foreach $partitions { cd $partition tmsh::delete $irulename }

     

  • Brent_West_7733's avatar
    Brent_West_7733
    Historic F5 Account

    You could use a TMSH script to retrieve a list of partitions, set irulename set tmsh::get_config partitions foreach $partitions { cd $partition tmsh::delete $irulename }

     

    • Ariel_Santa_Cr1's avatar
      Ariel_Santa_Cr1
      Historic F5 Account
      Thanks Brent, I've been working over the following Jason's script to make it "partitions aware" using the commands you recommended. https://devcentral.f5.com/s/articles/rapid-irule-removal-via-tmsh-script Unfortunately there's somthing still missing in the code, but Jason is helping me to troubleshoot the issue. Hope to have it ready later today.
    • Phil_Wedel_7401's avatar
      Phil_Wedel_7401
      Icon for Nimbostratus rankNimbostratus
      Hate to revive an old thread... but did you get the script working across partitions? Trying to deploy an iRule for the new Bash shell exploit.