[ClusterLabs] Format of '--lifetime' in 'pcs resource move'
Hi all, Reading the pcs man page for the 'move' action, it talks about '--lifetime' switch that appears to control when the location constraint is removed; move [destination node] [--master] [life‐ time=] [--wait[=n]] Move the resource off the node it is currently running on by creating a -INFINITY location constraint to ban the node. If destination node is specified the resource will be moved to that node by creating an INFINITY loca‐ tion constraint to prefer the destination node. If --master is used the scope of the command is limited to the master role and you must use the promotable clone id (instead of the resource id). If lifetime is specified then the constraint will expire after that time, other‐ wise it defaults to infinity and the constraint can be cleared manually with 'pcs resource clear' or 'pcs con‐ straint delete'. If --wait is specified, pcs will wait up to 'n' seconds for the resource to move and then return 0 on success or 1 on error. If 'n' is not speci‐ fied it defaults to 60 minutes. If you want the resource to preferably avoid running on some nodes but be able to failover to them use 'pcs constraint location avoids'. I think I want to use this, as we move resources manually for various reasons where the old host is still able to host the resource should a node failure occur. So we'd love to immediately remove the location constraint as soon as the move completes. I tries using '--lifetime=60' as a test, assuming the format was 'seconds', but that was invalid. How is this switch meant to be used? Cheers -- Digimer Papers and Projects: https://alteeve.com/w/ "I am, somehow, less interested in the weight and convolutions of Einstein’s brain than in the near certainty that people of equal talent have lived and died in cotton fields and sweatshops." - Stephen Jay Gould ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
Re: [ClusterLabs] Format of '--lifetime' in 'pcs resource move'
Have you tried ISO 8601 format. For example: 'PT20M' The ISo format is described at: https://manpages.debian.org/testing/crmsh/crm.8.en.html Best Regards, Strahil Nikolov На 20 август 2020 г. 13:40:16 GMT+03:00, Digimer написа: >Hi all, > > Reading the pcs man page for the 'move' action, it talks about >'--lifetime' switch that appears to control when the location >constraint >is removed; > > > move [destination node] [--master] [life‐ > time=] [--wait[=n]] > Move the resource off the node it is currently running > on by creating a -INFINITY location constraint to ban > the node. If destination node is specified the resource > will be moved to that node by creating an INFINITY loca‐ > tion constraint to prefer the destination node. If > --master is used the scope of the command is limited to > the master role and you must use the promotable clone id > (instead of the resource id). If lifetime is specified > then the constraint will expire after that time, other‐ > wise it defaults to infinity and the constraint can be > cleared manually with 'pcs resource clear' or 'pcs con‐ > straint delete'. If --wait is specified, pcs will wait > up to 'n' seconds for the resource to move and then > return 0 on success or 1 on error. If 'n' is not speci‐ > fied it defaults to 60 minutes. If you want the resource > to preferably avoid running on some nodes but be able to > failover to them use 'pcs constraint location avoids'. > > >I think I want to use this, as we move resources manually for various >reasons where the old host is still able to host the resource should a >node failure occur. So we'd love to immediately remove the location >constraint as soon as the move completes. > >I tries using '--lifetime=60' as a test, assuming the format was >'seconds', but that was invalid. How is this switch meant to be used? > >Cheers > >-- >Digimer >Papers and Projects: https://alteeve.com/w/ >"I am, somehow, less interested in the weight and convolutions of >Einstein’s brain than in the near certainty that people of equal talent >have lived and died in cotton fields and sweatshops." - Stephen Jay >Gould >___ >Manage your subscription: >https://lists.clusterlabs.org/mailman/listinfo/users > >ClusterLabs home: https://www.clusterlabs.org/ ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
[ClusterLabs] Antw: [EXT] Re: Format of '--lifetime' in 'pcs resource move'
>>> Strahil Nikolov schrieb am 20.08.2020 um 18:25 in Nachricht <329b5d02-2bcb-4a2c-bc2b-ca3030e6a...@yahoo.com>: > Have you tried ISO 8601 format. > For example: 'PT20M' And watch out not to mix Minutes wth Months ;-) > > The ISo format is described at: > https://manpages.debian.org/testing/crmsh/crm.8.en.html > > Best Regards, > Strahil Nikolov > > На 20 август 2020 г. 13:40:16 GMT+03:00, Digimer написа: >>Hi all, >> >> Reading the pcs man page for the 'move' action, it talks about >>'--lifetime' switch that appears to control when the location >>constraint >>is removed; >> >> >> move [destination node] [--master] [life‐ >> time=] [--wait[=n]] >> Move the resource off the node it is currently running >> on by creating a -INFINITY location constraint to ban >> the node. If destination node is specified the resource >> will be moved to that node by creating an INFINITY loca‐ >> tion constraint to prefer the destination node. If >> --master is used the scope of the command is limited to >> the master role and you must use the promotable clone id >> (instead of the resource id). If lifetime is specified >> then the constraint will expire after that time, other‐ >> wise it defaults to infinity and the constraint can be >> cleared manually with 'pcs resource clear' or 'pcs con‐ >> straint delete'. If --wait is specified, pcs will wait >> up to 'n' seconds for the resource to move and then >> return 0 on success or 1 on error. If 'n' is not speci‐ >> fied it defaults to 60 minutes. If you want the resource >> to preferably avoid running on some nodes but be able to >> failover to them use 'pcs constraint location avoids'. >> >> >>I think I want to use this, as we move resources manually for various >>reasons where the old host is still able to host the resource should a >>node failure occur. So we'd love to immediately remove the location >>constraint as soon as the move completes. >> >>I tries using '--lifetime=60' as a test, assuming the format was >>'seconds', but that was invalid. How is this switch meant to be used? >> >>Cheers >> >>-- >>Digimer >>Papers and Projects: https://alteeve.com/w/ >>"I am, somehow, less interested in the weight and convolutions of >>Einstein’s brain than in the near certainty that people of equal talent >>have lived and died in cotton fields and sweatshops." - Stephen Jay >>Gould >>___ >>Manage your subscription: >>https://lists.clusterlabs.org/mailman/listinfo/users >> >>ClusterLabs home: https://www.clusterlabs.org/ > ___ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/