Let $(M,d)$ be a complete, separable, compact metric space. Assume $M$ is geodesic, that is for any $x,y \in M$ there exists a distance realizing geodesic between $x$ and $y$ (not necessarily unique). A set $U \subseteq M$ is convex if for any $x,y \in U$ there exists a geodesic between $x$ and $y$ that lies entirely in $U$. Question: Is it true that for any $x \in M$ there exists an $\varepsilon' >0$ such that all $\varepsilon$-balls around $x$ for $\varepsilon < \varepsilon'$ are convex?

Two examples to illustrate the question:

Let $M= \{(x_1,x_2) \in \mathbb{R}^2 | x_2 \ge 0, x_1^2+x_2^2 \le 1 \} / \sim$ where $\sim$ is the equivalence relation $(x,0) \sim (-x,0)$, that is $M$ is a flat cone with the standard metric induced from $\mathbb{R}^2$. Then for any $\varepsilon >0$, the $\varepsilon$-ball around the point $(0,\varepsilon/2)$ is not convex. In particular, arbitrarily small non-convex balls exists. However, for every point sufficiently small balls around it are convex.

Let $M= \{(x_1,x_2) \in \mathbb{R}^2 | x_1^2+x_2^2 \le 1 \}$ be the unit disk with the Manhattan metric $d((x_1,x_2),(y_1,y_2)):=|x_1-y_1|+|x_2-y_2|$. Then the $\varepsilon$-balls are diamond shaped and are convex. However, distance realizing geodesics are not unique, in general there exist uncountably many and not all of them lie inside the $\varepsilon$-balls. Consider the radius $1/2$ ball around $(0,0)$ and the points $(2/5,0)$ and $(0,2/5)$. Then the geodesic through the point $(0,0)$ lie inside the ball but the geodesic through $(2/5,2/5)$ does not. Hence the formulation 'there exists a geodesic inside the ball' is crucial, the same statement with 'all geodesics lie inside the ball' is false.

A theorem that shows this under some additional assumptions on the metric space would also be interesting.