Forum Discussion

mhite_60883's avatar
mhite_60883
Icon for Cirrocumulus rankCirrocumulus
Feb 01, 2012

Transaction headaches

I seem to be immediately bumping into transaction headaches.

 

 

I'd like to create a partition/folder, then create a user who manages that partition in a single transaction.

 

 

Transaction:

 

 

partition = "mynewpartition"

 

 

f5_set_active_folder_v11(b, "/") switch to / folder

 

f5_create_folder_v11(b, partition) create a new folder off /

 

f5_set_active_folder_v11(b, partition) switch to new folder

 

f5_create_user(b, partition, user, pw, "manager") create new admin for folder

 

 

This doesn't work. You basically get an exception thrown when you try to run "f5_set_active_folder_v11(b, partition)".

 

 

So if you actually remove the "f5_set_active_folder_v11(b, partition)" part of the transaction, hoping that it will just do the right thing, you get this exception:

 

 

{

 

"error" : {

 

"detail" : "Server raised fault: 'Exception caught in System::urn:iControl:System/Session::submit_transaction()\nException: Common::OperationFailed\n\tprimary_error_code : 17241203 (0x01071473)\n\tsecondary_error_code : 0\n\terror_string : 01071473:3: Create, modify, and delete commands are not valid for (user) while in the root folder.'",

 

"code" : 6,

 

"message" : "Unable to create F5 user"

 

}

 

}

 

 

Is this not a good candidate for a transaction? What _can_ I safely stack in a transaction?

 

 

 

  • Also, if I switch to /Common to before doing f5_create_user in the transaction, I get this when I commit:

     

     

    {

     

    "error" : {

     

    "detail" : "Server raised fault: 'Exception caught in System::urn:iControl:System/Session::submit_transaction()\nException: Common::OperationFailed\n\tprimary_error_code : 17238057 (0x01070829)\n\tsecondary_error_code : 0\n\terror_string : 01070829:5: Input error: Can't create user/role/partition relationship, partition does not exist (xyzzy)'",

     

    "code" : 6,

     

    "message" : "Unable to create F5 user"

     

    }

     

    }
  • Lots of discussion in the iControl Guru Video stream about transaction gotchas... Joe asked that people post to the forum. Here's something I ran into.