pullback diagram of principal bundles

Let $G, G_1, G_2$ be compact Lie groups with homomorphisms $f_1:G_1 \to G$ and $f_2: G_2\to G$. Let $P_1, P_2$ be principal bundles for $G_1,G_2$ and assume that the bundles $P_i\times_{G_i} G$ are both isomorphic (by fixed isomorphisms) to a bundle $P$.

Let now $H$ be the pullback of the group diagram given by $f_1$ and $f_2$. Let $Q$ be the (topological) pullback of the induced diagram given by $P_1$, $P_2$ and $P$.

Now $Q$ has "fibres" equivalent to $H$, but does $Q$ always form a (locally trivial) principal $H$-bundle?

-

In the stated generality, it is false; for example, suppose that $G_1$ and $G_2$ are trivial groups, $P = B \times G$ (here $B$ is the base), and the maps $P_1 \to P$ and $P_2 \to P$ are given by two disjoint sections $B \to P$. In this case $Q$ is empty.
On the other hand, it is easy to see that the answer is positive if one of the $f_i$ is surjective (if $f_1$ is surjective, choose a local section of $P_2$, and locally lift the composite section of $P$ to a section of $P_1$, obtaining a local section of $Q$, which gives an local isomorphism of $Q$ with $B \times H$).
 The point is that the map $f_1: G_1 \to G$, as a surjective map of Lie groups, is a fibration; hence $P_1 \to P$ is also a fibration. If $B\to P$ is a section, the pullback of $P_1$ to $B$ is a fibration, hence it has local sections.