Forum Discussion

smp_86112's avatar
smp_86112
Icon for Cirrostratus rankCirrostratus
Apr 16, 2010

v10 upgrade and impact to iRules

I'm looking for feedback on some best practices around upgrading from v9 to v10, and its effect on iRules. Is there a resource that focues on the differences between the two versions, and that provide some guidance around which statements are most likely to cause problems? I did see the article on the class statement - I'm looking for more of that type of stuff.

 

 

What process have others gone through during their v9->v10 upgrades? How did you ensure your irules still functioned the same way when you move to 10?

4 Replies

  • Actually I think I found the doc resource I was looking for:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules.NewinVersion10

     

     

     

    I would still like to hear about the methodology that others have used to ensure their upgraded iRules functioned the same way.
  • Hi SMP,

     

     

    For most customers, we try to do an upgrade of a test unit from 9.x to the specific 10.x version they want to use in production. They then do a full regression test of each application that uses iRules. If you have a test unit, this is the route I'd suggest. Else, maybe you could get an eval unit for a few weeks from F5 or a partner to do this. LTM VE could be a way to do specific tests if you're planning on upgrading to 10.1, but it seems like there are too many differences in functionality between a physical appliance and VE to use it for full regression testing.

     

     

    If you don't have the option for using a test unit to try the upgrade, I'd try to schedule as long a maintenance window as you can get and then use a partition installation for 10.x and keep the 9.x instance. You could then fail over to the 10.x unit, test the applications and have a fall back to the peer unit and the option of switchbooting back to the 9.x slot.

     

     

    The biggest issues I've seen with upgrades involve the change to datagroup access. In v10.x, you can no longer access datagroups as TCL lists. 'class get' or 'class element' should provide similar functionality though. The syntax checking in v10 is also more strict. All datagroups must exist before an iRule referencing a datagroup. Also, in v10, you can avoid breaking CMP by replacing unchanging global variables using the static:: namespace. This assumes you're on a platform that supports CMP. For more info see this page: http://devcentral.f5.com/Wiki/default.aspx/iRules/CMPCompatibility.html

     

     

    Aaron
  • Aaron,

     

    you mentioned using a partition installation for 10.x and 'keep the 9.x instance'. Is that really possible? I have done the upgrade using partitions and it seems that it will always wipe out any version 9 system that exists on the box.

     

     

    of course there is an option to reinstall v9 AFTER the v10 system has been installed/upgrade.

     

     

    If there is an install path that retains the v9 system intact, could you please share it (and share it with the F5 support peoples). This has been a fairly signficant issue here as I don't have 'spare' F5 appliances sitting around to work with this. I also need a good, reliable .. and quick method to fall back to v9 if that becomes necessary for my standalone systems (not HA pairs).

     

     

    I think I have to rewrite my iRules that reference the classes. The update didn't seem to change/update the format of the class tables that were defined in the configuration. I was somewhat suprised. while the matchclass and findclass commands are supposed to continue to work (right?), it doesn't sound like other functions such as 'lindex' will return the correct value any longer. I'm thinking i should simply move to the 'class' command to be sure.

     

     

    But information on what the transition capabilties are would cetainly be useful!

     

     

    Thanks for your help and insight on this.
  • HI Brad,

     

     

    I've upgraded several 9.x units to 10.1 using partitions without wiping the filesystem and having to reinstall the 9.x slot. This seems to be counter to the 10.1 release notes which state you must reformat the filesystem, but it works. I'm guessing the reformat requirement might be for specific platforms. I don't believe there is a way to avoid reformatting in a 9.x to 10.2 upgrade and reinstalling the 9.x slot. See this post for details:

     

     

    Using image2disk to upgrade 9.4.7 to 10.2

     

    http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/aff/31/afv/topic/aft/1174044/afc/1174196/Default.aspx

     

     

     

    If there is an install path that retains the v9 system intact, could you please share it (and share it with the F5 support peoples). This has been a fairly signficant issue here as I don't have 'spare' F5 appliances sitting around to work with this. I also need a good, reliable .. and quick method to fall back to v9 if that becomes necessary for my standalone systems (not HA pairs).

     

     

     

    As I mentioned, colleagues and I tried a few different methods for upgrading to 10.2 and preserving a 9.x slot. None worked. We found this quite surprising so we opened a case with F5 Support. They confirmed that there isn't a supported method for doing this.

     

     

    And I discovered recently that doing a clean install of 10.1 or 10.2 is painful. The recent ISO files are too large to fit on a single CD. I think in an effort to keep the ISO file size down, F5 removed the PXE software from the ISOs. However, they're still over ~720Mb so I don't see any reason not to add back the PXE software. So you can't boot a VM or other host using just the ISO and serve the image to a BIG-IP. Instead, you can manually configure "a separate host as a PXE server [which provides] tftp, dhcp and http services." This is from SOL10819. Other options include using a supported USB DVD ROM or thumb drive. I found that formatting a USB key took over an hour on a 6400. I didn't have a supported DVD ROM handy so I haven't tried that option yet.

     

     

    All in all, the upgrade processes seem to be getting a lot harder. It would be great if F5 could have more empathy with their customers and take into account more than the one or two most common upgrade scenarios. Just trying to navigate all of the different upgrade related solutions and tech notes takes hours. Not everyone is going to be following F5's implied ideal plan of upgrading immediately to 10.x volumes with no option for quick backout to 9.x. I imagine it would cost F5 a trivial amount of money to ship each unit with a compatible, preformatted USB key or USB CD/DVD ROM that would make a clean install process much simpler. It would probably even save them money in the long term on support calls.

     

     

    Rant over... to answer your other questions:

     

     

     

    I think I have to rewrite my iRules that reference the classes. The update didn't seem to change/update the format of the class tables that were defined in the configuration. I was somewhat suprised.

     

     

     

    The datagroups themselves should be reformatted when you save the first configuration. I tested a 9.x formatted string datagroup on 10.0.1 a while back and remember that they were converted to the new format on the first config save (or maybe it was the first config load after the upgrade?).

     

     

    The iRules themselves won't be modified in any way. This is something you'll need to do manually. If you have any unit running the version you're going to upgrade to, you could test the iRule syntax there. Or you could try the 10.1 LTM Virtual Edition. 10.2 isn't part of the VE trial.

     

     

     

    While the matchclass and findclass commands are supposed to continue to work (right?), it doesn't sound like other functions such as 'lindex' will return the correct value any longer. I'm thinking i should simply move to the 'class' command to be sure.

     

     

     

    matchclass and findclass are supported in all current LTM versions as far as I'm aware. Long term, it would make sense to change from the findclass and matchclass commands to using 'class' commands. You can no longer access a datagroup directly as a TCL list in 10.x. You could use [class get my_class] to retrieve the datagroup as a list. However, 'class search' or 'class element' would probably be simpler and more efficient.

     

     

    Aaron