# confine iRule within a partition

**URL:** <https://community.f5.com/t/confine-irule-within-a-partition/47869>\
**Category:** Technical Forums\
**Tags:** irules, ltm, application-delivery\
**Created:** [November 24, 2015, 5:04pm UTC](https://community.f5.com/t/confine-irule-within-a-partition/47869 "2015-11-24T17:04:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vadym\_Chepkov](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Vadym\_Chepkov](https://community.f5.com/u/Vadym_Chepkov)\
**Post date:** [November 24, 2015, 5:04pm UTC](https://community.f5.com/t/confine-irule-within-a-partition/47869/1 "2015-11-24T17:04:54Z")

</div>

I have an iRule which looks like this:

```tcl
when HTTP_REQUEST {
  if {([string tolower [HTTP::uri]] starts_with "/profile")} {
        pool profile_3111
  }
  else {
        pool ecentral_4111
  }
}

```

default pool for the VIP is

```tcl
ecentral_4111

```

. pool is in offline status, but the VIP is online, because pool

```tcl
profile_3111

```

is online. That’s understandable. What I don’t understand, why do I get reply back, when request doesn’t contain ‘/profile’ ?

I opened a support ticket and engineer replied to me, this is because another pool with the same name but in a different partition is online. This can’t be a proper behavior, is it? And if it’s indeed works as expected, how do I confine traffic within a partition?

Thanks, Vadym

---

<div class="post-metadata">

**Author:** ![Samir\_Jha\_52506](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Samir\_Jha\_52506](https://community.f5.com/u/Samir_Jha_52506)\
**Post date:** [November 24, 2015, 5:47pm UTC](https://community.f5.com/t/confine-irule-within-a-partition/47869/2 "2015-11-24T17:47:18Z")

</div>

Best option to create pool with different object name & try. I guess its not bug/issue.

---

<div class="post-metadata">

**Author:** ![Vadym\_Chepkov](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Vadym\_Chepkov](https://community.f5.com/u/Vadym_Chepkov)\
**Post date:** [November 24, 2015, 5:55pm UTC](https://community.f5.com/t/confine-irule-within-a-partition/47869/3 "2015-11-24T17:55:56Z")

</div>

I think it’s a bug.

If you keep pools name the same you don’t have to create different set of irules for each environment under source control. You can just change name of the partition.

---

<div class="post-metadata">

**Author:** ![Renato](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@Renato](https://community.f5.com/u/Renato)\
**Post date:** [November 24, 2015, 7:18pm UTC](https://community.f5.com/t/confine-irule-within-a-partition/47869/4 "2015-11-24T19:18:06Z")

</div>

Partitions are useful only to group configuration for user permissions, route domains, sync-only groups etc. There is not a real isolation. Using it only to organize the configuration like real directories, IMHO, is a mistake. Moreover, I don’t know if it’s possible to programatically redirect a VS to an offline pool and expect it to dynamically inherit the new pool state, maybe would be better to check the pool state before redirecting in order to reject the connection manually in case of errors.
