This paper studies three versions of the multi-period mean-variance portfolio selection problem, that are: minimum variance problem, maximum expected return problem and the trade-off problem, in a Markovian regime switching market where the exit-time is uncertain and exogenous. The underlying Markov chain contains an absorbing state, which denotes the bankruptcy state. When the Markov chain switches to this state, the investors only get a random fraction, known as the recovery rate, taking values in [0, 1] of their wealth. Asset returns, as well as recovery rate, depend on the market state. Dynamic programming and Lagrange duality method are used to derive analytical expressions for optimal investment strategies and the mean-variance efficient frontier. It is shown that portfolio selection models with no bankruptcy state and certain exit-time can be considered as special cases of our model. Some numerical examples are provided to demonstrate the effect of the recovery rate and exit-probabilities.